home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 50 / CD-ROM 50 / CD-ROM 50.ISO / aplicat / corel / Custom / userproc.ps < prev   
Encoding:
Text File  |  1999-05-06  |  95.3 KB  |  4,147 lines

  1. %%  --------------------------------------------------------------------
  2. %%  ----------- CorelDRAW! USER-DEFINED FUNCTON FILE -------------------
  3. %%  --------------------------------------------------------------------
  4.  
  5. %% NOTES:
  6.  
  7.     There are two types of user defined functions: "Spot" and "Fill"
  8.  
  9.     - A "Spot" function is a function that takes two floating point arguments,
  10.         X and Y, both between -1 and 1,  and returns a single real value between
  11.         -1 and 1 (otherwise an execution error occurs) called Z.
  12.         The domain is a 2 X 2 rectangle that will be mapped (at print time) into
  13.         each cell of the halftoning screen.
  14.         The 3-D representation of the function Z = f(X,Y) (does not need
  15.         to be continuous but f(X,Y) must be defined for all -1 <= X, Y <= 1 )
  16.         is a surface whose higher points will be whitened first in each cell.
  17.         For more information about spot functions, read section 4.8 of the
  18.         POSTSCRIPT LANGUAGE REFERENCE MANUAL (By Adobe Systems Inc.).
  19.  
  20.     - A Fill function takes between 0 and 5 arguments.  It assumes there is a
  21.         path already drawn (may be closed or not, may be disconnected) and
  22.         attempts to fill it.
  23.  
  24.         A simple fill function could be:
  25.  
  26.                 /MyFill1
  27.                 { %0 parms
  28.                  .70 setgray fill
  29.                 } bind def
  30.  
  31.         For more complex fills, the fill function may refer to the current
  32.         object's bounding box that is always defined in MILs (1/1000 of an inch)
  33.         and relative to the bottom left of the current page.
  34.  
  35.         Globals Bbllx, Bblly, Bburx, Bbury can always be used to get the
  36.         object's bbox's lower left and upper right corners.
  37.  
  38.         NOTE 1: For objects with disconnected paths like multi-letter words
  39.         and disconnected lines & curves, the fill function will be called once
  40.         for each closed sub-path.  However, the object's bounding box remains
  41.         the same for each call.
  42.  
  43.         NOTE 2: When called by CorelDRAW!, the fill function will be inside a
  44.         "gsave - grestore" sequence so that the fill function does not need to
  45.         restore the original graphics state.  Also, the fill function should
  46.         make no assumption about the current graphics state other than the
  47.         following:
  48.         
  49.                         - The current rotation angle is 0 (-90 for sideways pages)
  50.                         - The current unit is the MIL (1/1000 inch)
  51.                         - There is a path ready to be filled.
  52.  
  53. SYNTAX FOR THIS FILE:
  54.  
  55.     - A function definition starts with a "%@Spot" ou "%@Fill"
  56.     iniciando na coluna um indicando que uma funτπo Exata ou Preenchimento estß prestes
  57.     a ser definida.  O restante da linhaΘ ignorado.
  58.     
  59.     - A linha imediatamente a seguir deve comeτar com o nome da funτπo
  60.     imediatamente precedida por uma '/' (barra) na coluna um (p.ex.: /MyFirstFill).
  61.     Este nome serß usado para identificar o preenchimento no arquivo .CDR e os
  62.     arquivos .EPS. O restante da linha indica o nome que aparece na caixa
  63.     de dißlogo de seleτπo da funτπo personalizada do CORELDRAW e os parΓmetros
  64.     de usußrio para essa funτπo: ╖ funτ⌡es Exata nπo sπo permitidos nenhum
  65.     parΓmetros de usußrio, apenas um nome a ser exibido. Nas funτ⌡es Preenchimento 
  66.     sπo permitidos parΓmetros de 0 to 5 especificados como segue:
  67.  
  68.             %<nomefnusu rio>,<num. parms> ,<nome do parm1>=<padr╞o1>,<nome do parm2>=<padr╞o2>,...
  69.  
  70.             onde: <nomefnusu rio> Θ o nome exibido na caixa de lista da seleτπo PSFILL; 
  71.             esta Θ a cadeia traduzida para vers⌡es de lφnguas estrangeiras
  72.          <num. parms> Θ um valor inteiro entre 0 e 5
  73.          <nome do parmX> Θ o significado do parm X (cadeia de atΘ 20 caract.)
  74.          <padr╞oX> Θ o valor numΘrico padrπo para esse parm (sempre inteiro)
  75.  
  76.             O n·mero de nomes e padr⌡es de parΓmetros deve sempre ser igual ao
  77.             valor <num. parms>.
  78.             Antes de chamar essa funτπo de preenchimento, o programa principal empilhar  
  79.             os parΓmetros na mesma ordem em que foram especificados.
  80.  
  81.         TODOS OS PARMS S├O INTEIROS.
  82.  
  83.         EXEMPLO:        uma funτπo de preenchimento com 3 parΓmetros
  84.  
  85.         %@Fill
  86.         /MyFunction  %NomeFunτπo,3,FundoCinza=100,PrimeiroPlanoCinza=50,Densidade=4
  87.             {        % when called, STACK= <BackGray> <ForeGray> <Density>
  88.             /Density exch 1 10 InRange def        % validate density
  89.             /ForeGray exch 0 100 InRange def        % validate foreground gray
  90.             /BackGray exch 0 100 InRange def        % validate background gray
  91.             ...
  92.             } bind def
  93.  
  94.             NOTE: the 'InRange' PostScript function.
  95.             The main program cannot validate the range of the parameters.
  96.             The fill function can use the supplied function: 'InRange' which is
  97.             described below:
  98.                 <value> <min> <max> InRange  ==>  <newval>
  99.                 InRange takes 3 arguments from the stack, then makes sure that
  100.                 <value> is between <min> and <max>. If so, it leaves <value>
  101.                 on the stack, otherwise it pushes a valid <newval> on the stack.
  102.  
  103.             Note: The 'wDstChck' PostScript function.
  104.             In the case of a maximum value that equals a minimum value, the
  105.             difference will be null and in most cases will cause a devision by zero.
  106.             The fill function can use the supplied function: 'wDstChck'
  107.                         which is described below:
  108.                 <MaxValue> <MinValue> wDstChck ==> MaxValue or MaxValue+1
  109.                 If the 2 values are equal
  110.                               then add 1 to MaxValue and leave it on the stack
  111.                             else
  112.                               leave MaxValue unchanged on the stack.
  113.  
  114.     - The next n lines contain the function's body enclosed in curly
  115.     brackets and followed by a "bind def" sequence.
  116.     - The content of the body is not parsed by CorelDRAW!.  A function definition is
  117.     terminated when the next '%@..." sequence is read or at the end of the file.
  118.     - Lines should not exceed 150 characters long.
  119.     - Function names should not exceed 20 characters.
  120.     - Parameter names should not exceed 20 characters.
  121.     - There is no limit for the number of lines in each function.
  122.  
  123.  
  124.  
  125.  
  126. %@Spot
  127. /InvertedSimpleDot %InvertedSimpleDot
  128.         { %def --SPOT FUNCTION : InvertedSimpleDot
  129.           dup mul exch dup mul add 1 sub
  130.         } bind def
  131.  
  132. %@Spot
  133. /OutCircleBlk %CφrculoExternoPreto:
  134.     { %def --SPOT FUNCTION : OUTCIRCLE: empty black circles
  135.           dup mul exch dup mul add 0.6 exch sub abs -0.5 mul
  136.         } bind def
  137.  
  138. %@Spot
  139. /OutCircleWhi %CírculoExternoBranco:
  140.     { %def --SPOT FUNCTION : OUTCIRCLE: empty black circles
  141.           dup mul exch dup mul add 0.6 exch sub abs 0.5 mul
  142.         } bind def
  143.  
  144. %@Spot
  145. /Diamond %Diamante:
  146.     { %def --SPOT FUNCTION : DIAMOND1
  147.                   abs exch abs 2 copy add .75 le 
  148.                     { dup mul exch dup mul add 1    exch sub} 
  149.                     { 2 copy add 1.25 le 
  150.                       {.85 mul add 1 exch sub} 
  151.                     {1 sub dup mul exch 1 sub dup mul    add 1 sub} ifelse
  152.                     } ifelse
  153.         } bind def
  154.  
  155. %@Spot
  156. /Diamond2 %Diamante2
  157.         { %def --SPOT FUNCTION : DIAMOND2
  158.           abs exch abs add 1 exch sub
  159.         } bind def
  160.  
  161. %@Spot
  162. /MicroWaves %MicroOndas:
  163.     { %def --SPOT FUNCTION : MICROWAVES
  164.           /wy exch def
  165.           180 mul cos 2 div wy dup dup dup mul mul sub mul wy add
  166.           180 mul cos
  167.         } bind def
  168.  
  169. %@Spot
  170. /Grid %Grade:
  171.     { %def --SPOT FUNCTION : A SQUARE GRID
  172.           2 copy abs exch abs gt 
  173.                     {exch} if
  174.           pop 2 mul 1 exch sub 3.5 div
  175.         } bind def
  176.  
  177. %@Spot
  178. /Lines %Linhas:
  179.     { %def --SPOT FUNCTION : STRAIGHT LINES
  180.           pop abs 2 mul 1 exch sub
  181.         } bind def
  182.  
  183.  
  184. %@Spot
  185. /Star %Star
  186.            { %def --SPOT FUNCTION : Star
  187.              abs exch abs 2 copy gt {exch} if
  188.              1  sub dup 0 eq { 0.01 add } if
  189.              atan 360 div
  190.            } bind def
  191.  
  192. %@Spot
  193. /Euclidean %Euclidean
  194.         { %def --SPOT FUNCTION : EUCLIDEAN composite dot
  195.                   abs exch abs 2 copy add 1 gt 
  196.                     {1 sub dup mul exch 1 sub dup mul add 1 sub} 
  197.                     {dup mul exch dup mul add 1 exch sub} ifelse
  198.         } bind def
  199.  
  200. %@Spot
  201. /Rhomboid %Rhomboid
  202.              { %def --SPOT FUNCTION : RHOMBOID
  203.                   abs exch abs .9 mul add 2 div
  204.         } bind def
  205.  
  206. %@Spot
  207. /Round %Round
  208.              { %def --SPOT FUNCTION : Round
  209.          abs exch abs 2 copy add 1 le
  210.          { dup mul exch dup mul add 1 exch sub }
  211.          { 1 sub dup mul exch 1 sub dup mul add 1 sub } ifelse
  212.         } bind def
  213.  
  214. %@Spot
  215. /Ellipse %Ellipse
  216.              { %def --SPOT FUNCTION : Ellipse
  217.           abs exch abs 2 copy 3 mul exch 4 mul add 3 sub dup 0 lt
  218.           { pop dup mul exch .75 div dup mul add 4 div 1 exch sub }
  219.           { dup 1 gt
  220.             { pop 1 exch sub dup mul exch 1 exch sub
  221.               .75 div dup mul add 4 div 1 sub }
  222.             { .5 exch sub exch pop exch pop } ifelse
  223.                     } ifelse
  224.                 } bind def
  225.  
  226. %@Spot
  227. /EllipseA %EllipseA
  228.              { %def --SPOT FUNCTION : EllipseA
  229.                  dup mul .9 mul exch dup mul add 1 exch sub
  230.         } bind def
  231.  
  232. %@Spot
  233. /InvertedEllipseA %InvertedEllipseA
  234.              { %def --SPOT FUNCTION : InvertedEllipseA
  235.                  dup mul .9 mul exch dup mul add 1 sub
  236.         } bind def
  237.  
  238. %@Spot
  239. /EllipseB %EllipseB
  240.              { %def --SPOT FUNCTION : EllipseB
  241.           dup 5 mul 8 div mul exch dup mul exch add sqrt 1 exch sub
  242.         } bind def
  243.  
  244. %@Spot
  245. /EllipseC %EllipseC
  246.              { %def --SPOT FUNCTION : EllipseC
  247.                   dup mul .9 mul exch dup mul add 1 exch sub
  248.         } bind def
  249.  
  250. %@Spot
  251. /InvertedEllipseC %InvertedEllipseC
  252.              { %def --SPOT FUNCTION : InvertedEllipseC
  253.                   dup mul .9 mul exch dup mul add 1 sub
  254.         } bind def
  255.  
  256. %@Spot
  257. /LineX %LineX
  258.              { %def --SPOT FUNCTION : LineX
  259.                   pop
  260.         } bind def
  261.  
  262. %@Spot
  263. /LineY %LineY
  264.              { %def --SPOT FUNCTION : LineY
  265.                   exch pop
  266.         } bind def
  267.  
  268. %@Spot
  269. /Square %Square
  270.              { %def --SPOT FUNCTION : Square
  271.           abs exch abs 2 copy lt { exch } if pop neg
  272.         } bind def
  273.  
  274. %@Spot
  275. /Cross %Cross
  276.              { %def --SPOT FUNCTION : Cross
  277.           abs exch abs 2 copy gt { exch } if pop neg
  278.         } bind def
  279.  
  280. %@Spot
  281. /DoubleDot %DoubleDot
  282.              { %def --SPOT FUNCTION : DoubleDot
  283.           2 {360 mul sin 2 div exch } repeat add
  284.         } bind def
  285.  
  286. %@Spot
  287. /InvertedDoubleDot %InvertedDoubleDot
  288.              { %def --SPOT FUNCTION : InvertedDoubleDot
  289.           2 {360 mul sin 2 div exch } repeat add neg
  290.         } bind def
  291.  
  292. %@Spot
  293. /CosineDot %CosineDot
  294.              { %def --SPOT FUNCTION : CosineDot
  295.           180 mul cos exch 180 mul cos add 2 div
  296.         } bind def
  297.  
  298. %@Spot
  299. /Double %Double 
  300.              { %def --SPOT FUNCTION : Double
  301.                   exch 2 div exch 
  302.                     2 { 360 mul sin 2 div exch } repeat add
  303.         } bind def
  304.  
  305. %@Spot
  306. /InvertedDouble %InvertedDouble
  307.              { %def --SPOT FUNCTION : InvertedDouble
  308.                   exch 2 div exch 
  309.                     2 { 360 mul sin 2 div exch } repeat add neg
  310.         } bind def
  311.  
  312.  
  313. %----------------------------------------------------------------------------
  314.  
  315. %@Fill
  316. /Archimedes %Arquimedes,4, FreqⁿΩncia:=8, LarguraLinha:=5, PrimeiroPlanoCinza:=100, FundoCinza:=0
  317.    {
  318.    /BackgroundGray exch -1 100 InRange def
  319.    /ForegroundGray exch 0 100 InRange def
  320.    /Linewidth      exch 0 100 InRange def
  321.    /Frequency      exch 2 100 InRange def
  322.  
  323.    /newfont 10 dict def
  324.    newfont begin
  325.  
  326.    /FontMatrix [0.3660 0 0
  327.                 0.3660 0 0] def
  328.    /FontType 3 def
  329.    /FontBBox [0 0 2.7320 2.7320] def
  330.    /Encoding 256 array def
  331.    0 1 255 {Encoding exch /.notdef put} for
  332.  
  333.    /BuildChar
  334.      { 2.7320  0
  335.        -0.1 -0.1 2.8320 2.8320
  336.        setcachedevice
  337.        pop begin
  338.  
  339.        0 0 moveto
  340.        0.5 0 lineto
  341.        0 0.8660 lineto
  342.        0.866 1.366 lineto
  343.        0 1.866 lineto
  344.        0 0.866 lineto
  345.  
  346.        0 1.866 moveto
  347.        0.5 2.7320 lineto
  348.        1.3660 2.2320 lineto
  349.        0.8660 1.3660 lineto
  350.        1.8660 1.3660 lineto
  351.        1.3660 2.2320 lineto
  352.        2.2320 2.7320 lineto
  353.        2.7320 1.8660 lineto
  354.        1.8660 1.3660 lineto
  355.        2.7320 0.8660 lineto
  356.        2.2320 0 lineto
  357.        1.3660 0.5 lineto
  358.        1.8660 1.3660 lineto
  359.  
  360.        1.3660 2.7320 moveto
  361.        1.3660 2.2320 lineto
  362.  
  363.        1.3660 0  moveto
  364.        1.3660 0.5 lineto
  365.  
  366.        0.5  0 moveto
  367.        1.3660 0.5 lineto
  368.        0.8660 1.3660 lineto
  369.  
  370.        2.2320 0 moveto
  371.        2.7320 0 lineto
  372.  
  373.        2.2320 2.7320 moveto
  374.        2.7320 2.7320 lineto
  375.  
  376.        0 2.7320 moveto
  377.        0.5 2.7320 lineto
  378.  
  379.        2.7320 0.8660 moveto
  380.        2.7320 1.8660 lineto
  381.  
  382.        Linewidth pntsize div 2.7320 mul setlinewidth
  383.        stroke
  384.        end
  385.      } def
  386.    end
  387.  
  388.    /pntsize 2000 Frequency div def
  389.    /FillFont newfont definefont pop
  390.    /FillFont findfont pntsize scalefont setfont
  391.  
  392.    eoclip
  393.    BackgroundGray 0 ge
  394.       { BackgroundGray 100 div 1 exch sub setgray fill }
  395.       { newpath } ifelse
  396.  
  397.    ForegroundGray 100 div 1 exch sub setgray
  398.  
  399.    Bblly pntsize Bbury
  400.      { Bbllx pntsize Bburx
  401.        { 1 index moveto
  402.        (a) show
  403.        } for
  404.      pop
  405.      } for
  406.    } bind def
  407.  
  408. %@Fill
  409. /Bars %Barras,4, Largura:=10, Espaτamento(%):=100, CinzaMßx:=100, CinzaMφn:=10
  410.    {
  411.    /MinGrey exch 0 100 InRange def
  412.    /MaxGrey exch MinGrey 100 InRange def
  413.    /Spacing exch 0 300 InRange def
  414.    /Width exch 1 100 InRange def
  415.  
  416.    /dgrey MaxGrey MinGrey sub def
  417.    /inc 1 Spacing 100 div add def
  418.  
  419.    eoclip newpath
  420.  
  421.    currentscreen
  422.    3 -1 roll
  423.    pop 90
  424.    3 1 roll
  425.    setscreen
  426.  
  427.    Bbllx Bblly translate
  428.    /dx Bburx Bbllx sub Width div def
  429.    /dy Bbury Bblly sub Width div def
  430.    Width 10 mul dup scale
  431.    /mtx matrix currentmatrix def
  432.    .05 setlinewidth
  433.  
  434.    0 inc dx
  435.      { 0 translate
  436.       -.5 .05 .5
  437.          { dup 0 moveto
  438.            dup dy lineto
  439.            dup mul 0.250001 exch sub sqrt 2 mul
  440.            dgrey mul MaxGrey exch sub 100 div 1 exch sub setgray
  441.            stroke
  442.          } for
  443.       mtx setmatrix
  444.       } for
  445.    dx 0 translate
  446.    90 rotate
  447.    /mtx matrix currentmatrix def
  448.    0 inc dy
  449.      { 0 translate
  450.       -.5 .05 .5
  451.          { dup 0 moveto
  452.            dup dx lineto
  453.            dup mul 0.250001 exch sub sqrt 2 mul
  454.            dgrey mul MaxGrey exch sub 100 div 1 exch sub setgray
  455.            stroke
  456.          } for
  457.       mtx setmatrix
  458.       } for
  459.    } bind def
  460.  
  461. %@Fill
  462. /Basketweave %Tranτado,4, FreqⁿΩncia:=6, LarguraLinha:=10, PrimeiroPlanoCinza:=100, LarguraTranτado(%):=100
  463.    {
  464.    /Width exch 1 200 InRange def
  465.    /Grey exch 0 100 InRange def
  466.    /LineWidth exch 0 100 InRange def
  467.    /Frequency exch 1 100 InRange def
  468.  
  469.    /dif Width 100 sub 100 div def
  470.  
  471.    /newfont 10 dict def
  472.    newfont begin
  473.  
  474.    /FontMatrix [.25  0
  475.                 0    .25
  476.                 0    0] def
  477.    /FontType 3 def
  478.    /FontBBox [0 0 4 4] def
  479.    /Encoding 256 array def
  480.    0 1 255 {Encoding exch /.notdef put} for
  481.    Encoding 97 /Holes put
  482.    Encoding 98 /Weave put
  483.  
  484.    /CharProcs 3 dict def
  485.    CharProcs begin
  486.    /.notdef {} def
  487.    /Holes
  488.       {
  489.       1 dif moveto
  490.       2 dif sub 1 lineto
  491.       1 2 dif sub lineto
  492.       dif 1 lineto
  493.       closepath
  494.       fill
  495.  
  496.       3 2 dif add moveto
  497.       4 dif sub 3 lineto
  498.       3 4 dif sub lineto
  499.       2 dif add 3 lineto
  500.       closepath
  501.       fill
  502.       } def
  503.    /Weave
  504.       {
  505.       0 3 dif add moveto
  506.       1 dif sub 4 lineto
  507.  
  508.       0 1 dif add moveto
  509.       1 dif lineto
  510.  
  511.       3 dif sub 4 moveto
  512.       4 dif sub 3 lineto
  513.  
  514.       1 dif sub 0 moveto
  515.       2 dif sub 1 lineto
  516.  
  517.       4 3 dif add moveto
  518.       3 2 dif add lineto
  519.  
  520.       3 dif sub 0 moveto
  521.       1 2 dif sub lineto
  522.  
  523.       4 1 dif add moveto
  524.       2 dif add 3 lineto
  525.  
  526.       dif 1 moveto
  527.       3 4 dif sub lineto
  528.  
  529.       LineWidth 100 div setlinewidth
  530.       stroke
  531.       } def
  532.    end
  533.  
  534.    /BuildChar
  535.      { 4  0
  536.        -0.1 -0.1 4.1 4.1
  537.        setcachedevice
  538.        exch begin
  539.        Encoding exch get
  540.        CharProcs exch get
  541.        end
  542.        exec
  543.      } def
  544.    end
  545.  
  546.    /pntsize 1000 Frequency div def
  547.  
  548.    /FillFont newfont definefont pop
  549.    /FillFont findfont pntsize scalefont setfont
  550.  
  551.    eoclip newpath
  552.  
  553.    Grey 100 div 1 exch sub setgray
  554.    Bblly pntsize Bbury
  555.      { Bbllx exch moveto
  556.        { (a) show
  557.          currentpoint
  558.          pop Bburx gt
  559.          {exit} if
  560.        } loop
  561.      } for
  562.  
  563.    0 setgray
  564.    Bblly pntsize Bbury
  565.      { Bbllx exch moveto
  566.        { (b) show
  567.          currentpoint
  568.          pop Bburx gt
  569.          {exit} if
  570.        } loop
  571.      } for
  572.  
  573.    } bind def
  574.  
  575. %@Fill
  576. /Birds %Pßssaros,4, FreqⁿΩncia:=8, LarguraLinha:=4, PrimeiroPlanoCinza:=100, FundoCinza:=0
  577.    {
  578.    /BackgroundGray exch -1 100 InRange def
  579.    /ForegroundGray exch 0 100 InRange def
  580.    /Linewidth      exch 0 100 InRange def
  581.    /Frequency      exch 2 100 InRange def
  582.  
  583.    /newfont 10 dict def
  584.    newfont begin
  585.  
  586.    /FontMatrix [0.0061  0
  587.                 0         0.0061
  588.                 0         0] def
  589.    /FontType 3 def
  590.    /FontBBox [-92 -150 46 12] def
  591.    /Encoding 256 array def
  592.    0 1 255 {Encoding exch /.notdef put} for
  593.  
  594.    /BuildChar
  595.      { 138  0
  596.        -92 -150 46 12
  597.        setcachedevice
  598.        pop begin
  599.  
  600.        2 {
  601.          gsave
  602.          3 {
  603.            -10 -8 moveto
  604.            60 24  -54 60  -9 72 curveto
  605.            -2.5 73.7  11.5 70.3  29 75.4 curveto
  606.  
  607.            -54 6 moveto
  608.            -45 14  -27 16  -18 18 curveto
  609.            27 27  -81 54  -9 90 curveto
  610.  
  611.            -126 9 moveto
  612.            -114 27  -66 66  -54 24 curveto
  613.            -53 21  -49 15  -43 12 curveto
  614.  
  615.            [ -1     0
  616.               0     1
  617.               0     0 ] concat
  618.              135 -81 translate
  619.          } repeat
  620.  
  621.        Linewidth pntsize div 162 mul setlinewidth
  622.        stroke
  623.        grestore
  624.        138 0 translate
  625.  
  626.      } repeat
  627.  
  628.      end
  629.      } def
  630.    end
  631.  
  632.    /pntsize 1174 Frequency div def
  633.  
  634.    /FillFont newfont definefont pop
  635.    /FillFont findfont pntsize scalefont setfont
  636.  
  637.    eoclip
  638.    BackgroundGray 0 ge
  639.       { BackgroundGray 100 div 1 exch sub setgray fill }
  640.       { newpath } ifelse
  641.  
  642.    ForegroundGray 100 div 1 exch sub setgray
  643.  
  644.    /urx Bburx pntsize add def
  645.    /ury Bbury pntsize add def
  646.     Bblly pntsize ury
  647.         { Bbllx exch moveto
  648.         { (a) show
  649.           currentpoint
  650.           pop urx gt
  651.           {exit} if
  652.         } loop
  653.       } for
  654.     } bind def
  655.  
  656. %@Fill
  657. /Bricks %Tijolos,4, FreqⁿΩncia:=8, LarguraLinha:=5, PrimeiroPlanoCinza:=100, FundoCinza:=0
  658.    {
  659.    /BackgroundGray exch -1 100 InRange def
  660.    /ForegroundGray exch 0 100 InRange def
  661.    /Linewidth      exch 0 100 InRange def
  662.    /Frequency      exch 2 100 InRange def
  663.  
  664.    /newfont 10 dict def
  665.    newfont begin
  666.  
  667.    /FontMatrix [1  0  0
  668.                 1  0  0] def
  669.    /FontType 3 def
  670.    /FontBBox [0 0 1 1] def
  671.    /Encoding 256 array def
  672.    0 1 255 {Encoding exch /.notdef put} for
  673.  
  674.    /BuildChar
  675.      { 1  0
  676.        -0.1 -0.1 1.1 1.1
  677.        setcachedevice
  678.        pop begin
  679.  
  680.        0 0 moveto
  681.        1 0 lineto
  682.        1 .5 lineto
  683.        0 .5 lineto
  684.        closepath
  685.        .5 .5 moveto
  686.        .5 1 lineto
  687.  
  688.        Linewidth pntsize div setlinewidth
  689.        stroke
  690.  
  691.       end
  692.      } def
  693.    end
  694.  
  695.    /pntsize 1000 Frequency div def
  696.  
  697.    /FillFont newfont definefont pop
  698.    /FillFont findfont pntsize scalefont setfont
  699.  
  700.    eoclip
  701.    BackgroundGray 0 ge
  702.       { BackgroundGray 100 div 1 exch sub setgray fill }
  703.       { newpath } ifelse
  704.  
  705.    ForegroundGray 100 div 1 exch sub setgray
  706.  
  707.    Bblly pntsize Bbury
  708.      { Bbllx exch moveto
  709.        { (a) show
  710.          currentpoint
  711.          pop Bburx gt
  712.          {exit} if
  713.        } loop
  714.      } for
  715.    } bind def
  716.  
  717. %@Fill
  718. /Bubbles %Bolhas,5, N·mero (pol▓):=25, TamanhoMßx:=300, TamanhoMφn:=10, LarguraLinha:=10, InφcioAleat≤rio:=0
  719.    { srand
  720.    /LineWidth exch 0 50 InRange def
  721.    /MinSize exch 1 1000 InRange def
  722.    /MaxSize exch MinSize 1000 InRange def
  723.    /Number exch 1 250 InRange def
  724.  
  725.    eoclip
  726.    newpath
  727.    /pntsize MaxSize MinSize div cvi def
  728.    /dx Bburx Bbllx sub def
  729.    /dy Bbury Bblly sub def
  730.  
  731.    dx dy mul Number mul 1000000 div cvi
  732.    {  rand dx mod Bbllx add
  733.       rand dy mod Bblly add
  734.       rand pntsize mod 1 add pntsize exch div MinSize mul
  735.       3 copy
  736.       2 index add
  737.       exch
  738.       moveto
  739.       pop
  740.       0 360 arc
  741.       gsave
  742.       0 setgray
  743.       LineWidth setlinewidth
  744.       stroke
  745.       grestore
  746.       1 setgray
  747.       fill
  748.       } repeat
  749.  
  750.    } bind def
  751.  
  752. %@Fill
  753. /Carpet %Tapete,5, FreqⁿΩncia(dpi):=72, Cinza:=100, Gamma(box_size):=50, FatorMod:=3, Alpha:=10
  754.    {
  755.    /Alpha exch def
  756.    /Modf exch def
  757.    /Gamma exch def
  758.    /Grey exch 0 100 InRange def
  759.    /Frequency exch 10 300 InRange def
  760.  
  761.    /Beta1 -10 def
  762.    /Beta2 -15 def
  763.  
  764.    eoclip newpath
  765.  
  766.    /wz 360 def
  767.    2 1 Gamma sqrt
  768.       { dup Gamma exch mod
  769.       0 eq { dup wz exch mod
  770.            0 eq { /wz wz 2 index div cvi def
  771.                 } if
  772.            } if
  773.       pop
  774.       } for
  775.  
  776.    /newfont 10 dict def
  777.    newfont begin
  778.  
  779.    /FontMatrix [1 wz div  0
  780.                 0          1 wz div
  781.                 0          0] def
  782.    /FontType 3 def
  783.    /FontBBox [0 0 wz wz] def
  784.    /Encoding 256 array def
  785.    0 1 255 {Encoding exch /.notdef put} for
  786.  
  787.    /BuildChar
  788.      { wz  0
  789.        -0.1 -0.1 wz 0.1 add wz 0.1 add
  790.        setcachedevice
  791.        pop begin
  792.  
  793.       0 1 wz
  794.          { 0 1 wz
  795.             { 1 index 2 copy
  796.             Gamma mul Beta2 add sin
  797.             exch Gamma mul Beta1 add sin
  798.             add Alpha mul cvi Modf mod
  799.             0 eq { moveto
  800.                   1 0 rlineto
  801.                   0 1 rlineto
  802.                   -1 0 rlineto
  803.                   closepath
  804.                   fill }
  805.                  { pop pop } ifelse
  806.             }   for
  807.          pop
  808.          } for
  809.  
  810.        end
  811.      } def
  812.    end
  813.  
  814.    /pntsize wz 1000 mul Frequency div def
  815.  
  816.    /FillFont newfont definefont pop
  817.    /FillFont findfont pntsize scalefont setfont
  818.  
  819.    Grey 100 div 1 exch sub setgray
  820.    Bblly pntsize Bbury
  821.      { Bbllx 1 index moveto
  822.        { (a) show
  823.          currentpoint
  824.          dup 3 index sub
  825.          pntsize 2 div gt { pntsize sub } if
  826.          1 index Bburx gt
  827.          {pop pop pop exit} if
  828.          moveto
  829.        } loop
  830.      } for
  831.    } bind def
  832.  
  833. %@Fill
  834. /CircleGrid %Cφrculo,5, FreqⁿΩncia:=6, LarguraLinha1:=6, LarguraLinha2:=6, Cinza1:=40, Cinza2:=40
  835.    {
  836.    /Grey2 exch -1 100 InRange def
  837.    /Grey1 exch -1 100 InRange def
  838.    /LineWidth2 exch 0 100 InRange def
  839.    /LineWidth1 exch 0 100 InRange def
  840.    /Frequency exch 1 72 InRange def
  841.  
  842.    /newfont 10 dict def
  843.    newfont begin
  844.  
  845.    /FontMatrix [0.1924  0
  846.                 0                   0.1924
  847.                 0                   0] def
  848.    /FontType 3 def
  849.    /FontBBox [0 0 2 5.1961] def
  850.  
  851.    /Encoding 256 array def
  852.    0 1 255 {Encoding exch /.notdef put} for
  853.    Encoding 97 /OneCircle put
  854.    Encoding 98 /OneCircleFilled put
  855.    Encoding 99 /TwoCircles put
  856.    Encoding 100 /TwoCirclesFilled put
  857.  
  858.    /CharProcs 5 dict def
  859.    CharProcs begin
  860.    /.notdef {} def
  861.    /OneCircle
  862.      { 1.8660  4.3301 moveto
  863.        1  4.3301  0.8660 0 360 arc
  864.  
  865.        LineWidth1 pntsize div 5.1961 mul setlinewidth
  866.        stroke
  867.    } def
  868.  
  869.    /OneCircleFilled
  870.      { 1.8660  4.3301 moveto
  871.        1  4.3301  0.8660 0 350 arc
  872.  
  873.        fill
  874.    } def
  875.  
  876.    /TwoCircles
  877.      { 1.8660 0.8660 moveto
  878.        1 3 sqrt 2 div dup 0 360 arc
  879.  
  880.        1.8660  2.5980 moveto
  881.        1  2.5980  0.8660 0 360 arc
  882.  
  883.        LineWidth2 pntsize div 5.1961 mul setlinewidth
  884.        stroke
  885.    } def
  886.  
  887.    /TwoCirclesFilled
  888.      { 1.8660 0.8660 moveto
  889.        1 3 sqrt 2 div dup 0 360 arc
  890.  
  891.        1.8660  2.5980 moveto
  892.        1  2.5980  0.8660 0 360 arc
  893.  
  894.        fill
  895.    } def
  896.  
  897.    end
  898.  
  899.    /BuildChar
  900.      {1.5  2.5980
  901.       -0.1 -0.1 2.1  5.2961
  902.       setcachedevice
  903.       exch begin
  904.       Encoding exch get
  905.       CharProcs exch get
  906.       end
  907.       exec
  908.      }def
  909.    end
  910.  
  911.    /pntsize 3000 Frequency div def
  912.  
  913.    /FillFont newfont definefont pop
  914.    /FillFont findfont pntsize scalefont setfont
  915.  
  916.    /Bbllx Bbllx pntsize sub def
  917.    /Bblly Bblly pntsize sub def
  918.    /Bburx Bburx pntsize add def
  919.    /Bbury Bbury pntsize add def
  920.  
  921.    eoclip newpath
  922.  
  923.    Grey1 0 ge
  924.       { Grey1 100 div 1 exch sub setgray
  925.       Bblly pntsize Bbury
  926.         { Bbllx 1 index moveto
  927.           { (b) show
  928.             currentpoint
  929.             dup 3 index sub
  930.             pntsize 2.1 div gt { pntsize sub } if
  931.             1 index Bburx gt
  932.             {pop pop pop exit} if
  933.             moveto
  934.           } loop
  935.        } for
  936.       } if
  937.  
  938.    Grey2 0 ge
  939.       { Grey2 100 div 1 exch sub setgray
  940.       Bblly pntsize Bbury
  941.         { Bbllx 1 index moveto
  942.           { (d) show
  943.             currentpoint
  944.             dup 3 index sub
  945.             pntsize 2.1 div gt { pntsize sub } if
  946.             1 index Bburx gt
  947.             {pop pop pop exit} if
  948.             moveto
  949.           } loop
  950.         } for
  951.       } if
  952.  
  953.    LineWidth1 0 gt
  954.       { 0 setgray
  955.       Bblly pntsize Bbury
  956.         { Bbllx 1 index moveto
  957.           { (a) show
  958.             currentpoint
  959.             dup 3 index sub
  960.             pntsize 2.1 div gt { pntsize sub } if
  961.             1 index Bburx gt
  962.             {pop pop pop exit} if
  963.             moveto
  964.           } loop
  965.         } for
  966.       } if
  967.  
  968.    LineWidth2 0 gt
  969.       { 0 setgray
  970.       Bblly pntsize Bbury
  971.         { Bbllx 1 index moveto
  972.           { (c) show
  973.             currentpoint
  974.             dup 3 index sub
  975.             pntsize 2.1 div gt { pntsize sub } if
  976.             1 index Bburx gt
  977.             {pop pop pop exit} if
  978.             moveto
  979.           } loop
  980.         } for
  981.       } if
  982.  
  983.    } bind def
  984.  
  985. %@Fill
  986. /Construction %Estruturas,4, FreqⁿΩncia:=8, LarguraLinha:=5, PrimeiroPlanoCinza:=100, FundoCinza:=0
  987.    {
  988.    /BackgroundGray exch -1 100 InRange def
  989.    /ForegroundGray exch 0 100 InRange def
  990.    /Linewidth      exch 0 100 InRange def
  991.    /Frequency      exch 2 100 InRange def
  992.  
  993.    /newfont 10 dict def
  994.    newfont begin
  995.  
  996.    /FontMatrix  [ .1     0
  997.                   0      .1
  998.                   0      0] def
  999.    /FontType 3 def
  1000.    /FontBBox [-1 -1 9.66 11] def
  1001.    /Encoding 256 array def
  1002.    0 1 255 {Encoding exch /.notdef put} for
  1003.  
  1004.    /BuildChar
  1005.      { 8.66 5
  1006.        -1 -1 9.66 11
  1007.        setcachedevice
  1008.        pop begin
  1009.  
  1010.        1 0 moveto
  1011.        0 0 1 -60 300 arc
  1012.        9.1602  4.1339 lineto
  1013.        8.6602  5  1  -60 420 arc
  1014.        .5  10.866 lineto
  1015.        0 10 1 60 180 arc
  1016.        -1 0 lineto
  1017.  
  1018.        -.5 3 sqrt 2 div moveto
  1019.        8.1602 5.8660 lineto
  1020.        8.1602  4.1339 moveto
  1021.        -.5  9.134 lineto
  1022.        1 10 moveto
  1023.        1 0 lineto
  1024.  
  1025.        Linewidth pntsize div 10 mul setlinewidth
  1026.        stroke
  1027.       end
  1028.      } def
  1029.    end
  1030.  
  1031.    /pntsize 1126 Frequency div def
  1032.    /FillFont newfont definefont pop
  1033.    /FillFont findfont pntsize scalefont setfont
  1034.  
  1035.    /Bbllx Bbllx pntsize sub def
  1036.  
  1037.    eoclip
  1038.    BackgroundGray 0 ge
  1039.       { BackgroundGray 100 div 1 exch sub setgray fill }
  1040.       { newpath } ifelse
  1041.  
  1042.    ForegroundGray 100 div 1 exch sub setgray
  1043.  
  1044.    Bblly pntsize Bbury
  1045.      { Bbllx 1 index moveto
  1046.        { (a) show
  1047.          currentpoint
  1048.          dup 3 index sub
  1049.          pntsize 2.1 div gt { pntsize sub } if
  1050.          1 index Bburx gt
  1051.          {pop pop pop exit} if
  1052.          moveto
  1053.        } loop
  1054.      } for
  1055.    } bind def
  1056.  
  1057. %@Fill
  1058. /Cracks %Rachaduras,5, N·mero:=20, TamanhoMßx:=125, TamanhoMφn:=75, CompPasso:=14, LarguraLinha:=5
  1059.    {
  1060.    /LineWidth exch 0 100 InRange def
  1061.    /StepLength exch 1 100 InRange def
  1062.    /MinLength exch 1 300 InRange def
  1063.    /MaxLength exch MinLength 300 InRange MinLength wDstChck def
  1064.    /Number exch 1 100 InRange def
  1065.  
  1066.    eoclip newpath
  1067.  
  1068.    /dx Bburx Bbllx sub def
  1069.    /dy Bbury Bblly sub def
  1070.  
  1071.    Number {
  1072.       gsave
  1073.       /theta rand 360 mod def
  1074.  
  1075.       rand dx mod Bbllx add
  1076.       rand dy mod Bblly add
  1077.       moveto
  1078.  
  1079.       StepLength dup scale
  1080.       LineWidth StepLength div setlinewidth
  1081.  
  1082.       MinLength
  1083.       MaxLength MinLength sub
  1084.       rand 1 index mod 2 index add
  1085.          {
  1086.          currentpoint translate
  1087.          rand 120 mod 60 sub theta add dup rotate
  1088.          0 0 moveto
  1089.          1 0 lineto
  1090.          stroke
  1091.          1 0 moveto
  1092.          neg rotate
  1093.          } repeat
  1094.       grestore
  1095.       pop pop
  1096.       } repeat
  1097.    } bind def
  1098.  
  1099. %@Fill
  1100. /Craters %Crateras,5, N·mero:=15, TamanhoMßx:=300, TamanhoMφn:=75, FundoCinza:=0, InφcioAleat≤rio:=0
  1101.    { srand
  1102.    /BackgroundGrey exch 0 100 InRange def
  1103.    /MinSize exch 1 500 InRange def
  1104.    /MaxSize exch MinSize 500 InRange MinSize wDstChck def
  1105.    /Number exch 1 50 InRange def
  1106.  
  1107.    eoclip
  1108.    BackgroundGrey 100 div 1 exch sub setgray
  1109.    fill
  1110.  
  1111.    /pntsize 333 def
  1112.    /dx Bburx Bbllx sub def
  1113.    /dy Bbury Bblly sub def
  1114.    /DifSize MaxSize MinSize sub cvi def
  1115.  
  1116.    Bbllx Bblly translate
  1117.  
  1118.    matrix currentmatrix
  1119.    dx dy mul 1000000 div Number mul cvi {
  1120.       dup
  1121.       rand dx mod  rand dy mod  translate
  1122.       /size rand DifSize mod MinSize add def
  1123.       0 0 size .7 mul  0 360 arc
  1124.       BackgroundGrey 100 div 1 exch sub setgray fill
  1125.  
  1126.       0
  1127.          { rand 18 mod add 10 add
  1128.          dup 360 gt { pop exit } if
  1129.          dup rotate
  1130.          size 5 div  0 moveto
  1131.          rand 300 mod 200 add 500 div size mul  0 lineto
  1132.          dup neg rotate
  1133.          } loop
  1134.  
  1135.       0 setgray
  1136.       5 setlinewidth
  1137.       stroke
  1138.       setmatrix
  1139.       } repeat
  1140.    pop
  1141.    } bind def
  1142.  
  1143. %@Fill
  1144. /Crosshatching %Hachuras,5, DistMßx:=75, DistMφn:=0, LarguraLinha:=5, ┬ngulo:=45, InφcioAleat≤rio:=0
  1145.    { srand
  1146.    /Angle exch -180 180 InRange def
  1147.    /LineWidth exch 0 100 InRange def
  1148.    /MinDist exch 0 500 InRange def
  1149.    /MaxDist exch MinDist 500 InRange MinDist wDstChck def
  1150.  
  1151.    eoclip
  1152.    newpath
  1153.  
  1154.    /pntsize MaxDist MinDist sub def
  1155.    /dx2 Bburx Bbllx sub 2 div def
  1156.    /dy2 Bbury Bblly sub 2 div def
  1157.    /hyp2 dx2 dup mul dy2 dup mul add sqrt def
  1158.  
  1159.    Bbllx Bblly translate
  1160.    dx2 dy2 translate
  1161.    Angle rotate
  1162.    LineWidth setlinewidth
  1163.  
  1164.    /wd hyp2 neg def
  1165.       { /wd rand pntsize mod MinDist add wd add def
  1166.       wd hyp2 neg moveto
  1167.       wd hyp2 lineto
  1168.       stroke
  1169.       wd hyp2 gt {exit} if
  1170.       } loop
  1171.  
  1172.    Angle -2 mul rotate
  1173.    /wd hyp2 neg def
  1174.       { /wd rand pntsize mod MinDist add wd add def
  1175.       wd hyp2 neg moveto
  1176.       wd hyp2 lineto
  1177.       stroke
  1178.       wd hyp2 gt {exit} if
  1179.       } loop
  1180.  
  1181.    } bind def
  1182.  
  1183. %@Fill
  1184. /CrystalLattice %Cristal,4, FreqⁿΩncia:=4, CinzaFundo:=100, CinzaFrente:=0, Dimensπo(%):=75
  1185.    {
  1186.    /Scaling exch 10 100 InRange def
  1187.    /FrontGrey exch 0 100 InRange def
  1188.    /BackGrey exch -100 100 InRange def
  1189.    /Frequency exch 1 50 InRange def
  1190.  
  1191.    /newfont 10 dict def
  1192.    newfont begin
  1193.  
  1194.    /FontMatrix [1                   0
  1195.                 0                   1
  1196.                 0                   0] def
  1197.    /FontType 3 def
  1198.    /FontBBox [0 0 1 1] def
  1199.    /Encoding 256 array def
  1200.    0 1 255 {Encoding exch /.notdef put} for
  1201.  
  1202.    /BuildChar
  1203.      { 1 0
  1204.        -0.1 -0.1 1.1 1.1
  1205.        setcachedevice
  1206.        pop begin
  1207.  
  1208.        gsave
  1209.        0 0 moveto
  1210.        3 { 1 0 lineto
  1211.          currentpoint translate
  1212.          90 rotate
  1213.          } repeat
  1214.        closepath
  1215.        .05 setlinewidth
  1216.        stroke
  1217.        grestore
  1218.  
  1219.        gsave
  1220.        4 { .2 0 moveto
  1221.          0 0 .2 0 360 arc
  1222.          fill
  1223.          1 0 translate
  1224.          90 rotate
  1225.          } repeat
  1226.        grestore
  1227.  
  1228.        end
  1229.      } def
  1230.    end
  1231.  
  1232.    /pntsize 1000 Frequency div cvi def
  1233.  
  1234.    /FillFont newfont definefont pop
  1235.    /FillFont findfont pntsize scalefont setfont
  1236.  
  1237.    /dx Bburx Bbllx sub def
  1238.    /dy Bbury Bblly sub def
  1239.  
  1240.    eoclip newpath
  1241.  
  1242.    currentscreen
  1243.    3 -1 roll
  1244.    pop 120
  1245.    3 1 roll
  1246.    setscreen
  1247.  
  1248.    Bbllx dx 2 div add  Bblly dy 2 div add translate
  1249.  
  1250.    /dx dx 100 mul Scaling div def
  1251.    /dy dy 100 mul Scaling div def
  1252.  
  1253.    Scaling 100 div dup scale
  1254.    100 Scaling div log 10 div 10 exch exp
  1255.    BackGrey 0 100 InRange 100 div  FrontGrey BackGrey sub 1000 div  FrontGrey .1 sub 100 div
  1256.       { 1 exch sub setgray
  1257.       dup dup scale
  1258.       dy 2 div cvi dup pntsize mod pntsize 2 div sub sub neg
  1259.         pntsize   dy pntsize add 2 div
  1260.         { dx 2 div cvi dup pntsize mod pntsize 2 div sub sub neg
  1261.           1 index moveto
  1262.           { (a) show
  1263.             currentpoint
  1264.             dup 3 index sub
  1265.             pntsize 2.1 div gt { pntsize sub } if
  1266.             1 index dx pntsize add 2 div gt
  1267.             { pop pop pop exit } if
  1268.             moveto
  1269.           } loop
  1270.         } for
  1271.       } for
  1272.       pop
  1273.    } bind def
  1274.  
  1275. %@Fill
  1276. /Denim %Brim,5, FreqⁿΩncia:=72, CinzaMßx:=100, CinzaMφn:=0, TelaMeioTom:=60, InφcioAleat≤rio:=0
  1277.    { srand
  1278.    /Screen exch 30 300 InRange def
  1279.    /MinGrey exch 0 100 InRange def
  1280.    /MaxGrey exch MinGrey 100 InRange def
  1281.    /Frequency exch 1 300 InRange def
  1282.  
  1283.    eoclip newpath
  1284.  
  1285.    currentscreen
  1286.    3 -1 roll
  1287.    pop Screen
  1288.    3 1 roll
  1289.    setscreen
  1290.  
  1291.    /dx Bburx Bbllx sub def
  1292.    /dy Bbury Bblly sub def
  1293.    /wf Frequency 1000 div def
  1294.    /dgrey MaxGrey MinGrey sub 100 div def
  1295.  
  1296.    Bbllx Bblly translate
  1297.    /str 512 string def
  1298.  
  1299.    dx wf mul cvi 1 add  dy wf mul cvi 1 add  8  [wf 0 0 wf 0 0]
  1300.       { dgrey MinGrey 2.55 mul
  1301.       0 1 511
  1302.          { str exch
  1303.          rand -11 bitshift 255 and 4 index mul 3 index add cvi
  1304.          put
  1305.          } for
  1306.       pop pop
  1307.       str
  1308.      }image
  1309.  
  1310.    } bind def
  1311.  
  1312. %@Fill
  1313. /DNA %DNA,5, FreqⁿΩncia:=4, LarguraLinha:=1, PrimeiroPlanoCinza:=100, FundoCinza:=0, Espaτamento(%):=100
  1314.    {
  1315.    /Spacing        exch 1 300 InRange def
  1316.    /BackgroundGray exch -1 100 InRange def
  1317.    /ForegroundGray exch 0 100 InRange def
  1318.    /Linewidth      exch 0 100 InRange def
  1319.    /Frequency      exch 1 100 InRange def
  1320.  
  1321.    /newfont 10 dict def
  1322.    newfont begin
  1323.  
  1324.    /FontMatrix [1 360 div             0
  1325.                 0                   1 360 div
  1326.                 0                   0] def
  1327.    /FontType 3 def
  1328.    /FontBBox [-20 0 20 360] def
  1329.    /Encoding 256 array def
  1330.    0 1 255 {Encoding exch /.notdef put} for
  1331.  
  1332.    /BuildChar
  1333.      { Spacing 110
  1334.        -20  0 20 360
  1335.        setcachedevice
  1336.        pop begin
  1337.  
  1338.        Linewidth pntsize mul 110 div setlinewidth
  1339.        0 0 moveto
  1340.        0 1 360
  1341.           { dup sin 20 mul exch lineto
  1342.           } for
  1343.        stroke
  1344.        20 0 moveto
  1345.        0 1 360
  1346.           { dup cos 20 mul exch lineto
  1347.           } for
  1348.        stroke
  1349.        0 20 360
  1350.           { dup dup sin 20 mul exch moveto
  1351.           dup cos 20 mul exch lineto
  1352.           } for
  1353.        stroke
  1354.  
  1355.        end
  1356.      } def
  1357.    end
  1358.  
  1359.    /pntsize 2000 Frequency div def
  1360.  
  1361.    /FillFont newfont definefont pop
  1362.    /FillFont findfont pntsize scalefont setfont
  1363.  
  1364.    eoclip
  1365.    BackgroundGray 0 ge
  1366.       { BackgroundGray 100 div 1 exch sub setgray fill }
  1367.       { newpath } ifelse
  1368.  
  1369.    ForegroundGray 100 div 1 exch sub setgray
  1370.  
  1371.    Bblly pntsize sub pntsize Bbury pntsize add
  1372.      { Bbllx 1 index moveto
  1373.        { (a) show
  1374.          currentpoint
  1375.          dup 3 index sub
  1376.          pntsize 2.1 div gt { pntsize sub } if
  1377.          1 index Bburx gt
  1378.          {pop pop pop exit} if
  1379.          moveto
  1380.        } loop
  1381.      } for
  1382.    } bind def
  1383.  
  1384. %@Fill
  1385. /Fishscale %Escamas,4, FreqⁿΩncia:=8, LarguraLinha:=5, PrimeiroPlanoCinza:=100, FundoCinza:=0
  1386.    {
  1387.    /BackgroundGray exch -1 100 InRange def
  1388.    /ForegroundGray exch 0 100 InRange def
  1389.    /Linewidth      exch 0 100 InRange def
  1390.    /Frequency      exch 2 100 InRange def
  1391.  
  1392.    /newfont 10 dict def
  1393.    newfont begin
  1394.  
  1395.    /FontMatrix [1  0  0
  1396.                 1  0  0] def
  1397.    /FontType 3 def
  1398.    /FontBBox [0 0 1 1] def
  1399.    /Encoding 256 array def
  1400.    0 1 255 {Encoding exch /.notdef put} for
  1401.  
  1402.    /BuildChar
  1403.      { 1  0
  1404.        0 0 1 1
  1405.        setcachedevice
  1406.        pop begin
  1407.  
  1408.        0.5 0.5 0.5 360 180 arcn
  1409.        0 1 0.5 270 360 arc
  1410.        1 1 0.5 180 270 arc
  1411.  
  1412.        Linewidth pntsize div setlinewidth
  1413.        stroke
  1414.  
  1415.       end
  1416.      } def
  1417.    end
  1418.  
  1419.    /pntsize 1000 Frequency div def
  1420.    /FillFont newfont definefont pop
  1421.    /FillFont findfont pntsize scalefont setfont
  1422.  
  1423.    eoclip
  1424.    BackgroundGray 0 ge
  1425.       { BackgroundGray 100 div 1 exch sub setgray fill }
  1426.       { newpath } ifelse
  1427.  
  1428.    ForegroundGray 100 div 1 exch sub setgray
  1429.  
  1430.     Bblly pntsize Bbury
  1431.       { Bbllx exch moveto
  1432.         { (a) show
  1433.           currentpoint
  1434.           pop Bburx gt
  1435.           {exit} if
  1436.         } loop
  1437.       } for
  1438.     } bind def
  1439.  
  1440.  
  1441. %@Fill
  1442. /Grass %Grama,5, N·mero:=100, TamanhoMßx:=35, TamanhoMφn:=7, Cinza:=0, InφcioAleat≤rio:=0
  1443.     { srand
  1444.     /Grey exch -1 100 InRange def
  1445.     /MinSize exch 1 100 InRange def
  1446.     /MaxSize exch MinSize 100 InRange MinSize wDstChck def
  1447.     /Number exch 1 500 InRange def
  1448.  
  1449.     eoclip
  1450.     Grey 0 ge
  1451.        { Grey 100 div 1 exch sub setgray fill }
  1452.        { newpath } ifelse
  1453.  
  1454.     /Bbllx Bbllx MaxSize sub def
  1455.     /Bblly Bblly MaxSize sub def
  1456.  
  1457.     /dx Bburx Bbllx sub def
  1458.     /dy Bbury Bblly sub def
  1459.     /dSize MaxSize MinSize sub def
  1460.  
  1461.     dx dy mul 1000000 div Number mul cvi
  1462.        {
  1463.  
  1464.        matrix currentmatrix
  1465.  
  1466.        rand dx mod Bbllx add
  1467.        rand dy mod Bblly add
  1468.        translate
  1469.  
  1470.        rand dSize mod MinSize add
  1471.        dup scale
  1472.  
  1473.        -0.5 0 moveto
  1474.        rand 14 mod 7 sub
  1475.        -0.5 3  2 index 3 div 0.3 sub 10  4 index 10 curveto
  1476.        3 div 0.3 add 10 0.5 3 0.5 0 curveto
  1477.        gsave
  1478.        1 setgray
  1479.        fill
  1480.        grestore
  1481.        0.1 setlinewidth
  1482.        0 setgray
  1483.        stroke
  1484.  
  1485.        setmatrix
  1486.  
  1487.        } repeat
  1488.  
  1489.      } bind def
  1490.  
  1491. %@Fill
  1492. /Hatching %Paralelas,5, DistMßx:=75, DistMφn:=0, LarguraLinha:=5, ┬ngulo:=45, InφcioAleat≤rio:=0
  1493.    { srand
  1494.    /Angle exch -180 180 InRange def
  1495.    /LineWidth exch 0 100 InRange def
  1496.    /MinDist exch 0 500 InRange def
  1497.    /MaxDist exch MinDist 500 InRange MinDist wDstChck def
  1498.  
  1499.    eoclip
  1500.    newpath
  1501.  
  1502.    /pntsize MaxDist MinDist sub def
  1503.    /dx2 Bburx Bbllx sub 2 div def
  1504.    /dy2 Bbury Bblly sub 2 div def
  1505.    /hyp2 dx2 dup mul dy2 dup mul add sqrt def
  1506.  
  1507.    Bbllx Bblly translate
  1508.    dx2 dy2 translate
  1509.    Angle rotate
  1510.    LineWidth setlinewidth
  1511.  
  1512.    /wd hyp2 neg def
  1513.  
  1514.       { /wd rand pntsize mod MinDist add wd add def
  1515.       wd hyp2 neg moveto
  1516.       wd hyp2 lineto
  1517.       stroke
  1518.       wd hyp2 gt {exit} if
  1519.       } loop
  1520.  
  1521.    } bind def
  1522.  
  1523. %@Fill
  1524. /Hexagons %Hexßgonos,4, FreqⁿΩncia:=8, LarguraLinha:=5, PrimeiroPlanoCinza:=100, FundoCinza:=0
  1525.    {
  1526.    /BackgroundGray exch -1 100 InRange def
  1527.    /ForegroundGray exch 0 100 InRange def
  1528.    /LineWidth      exch 0 100 InRange def
  1529.    /Frequency      exch 2 100 InRange def
  1530.  
  1531.    /newfont 10 dict def
  1532.    newfont begin
  1533.  
  1534.    /FontMatrix [0.5773       0
  1535.                 0                   0.5773
  1536.                 0                   0] def
  1537.    /FontType 3 def
  1538.    /FontBBox [0 0 2 1.7320] def
  1539.    /Encoding 256 array def
  1540.    0 1 255 {Encoding exch /.notdef put} for
  1541.  
  1542.    /BuildChar
  1543.      { 1.5  0.8660
  1544.        -0.1 -0.1 2.1 1.8320
  1545.        setcachedevice
  1546.        pop begin
  1547.  
  1548.        0.5  0 moveto
  1549.        1.5  0 lineto
  1550.        2  0.8660 lineto
  1551.        1.5  1.7320 lineto
  1552.        0.5  1.7320 lineto
  1553.        0  0.8660  lineto
  1554.        closepath
  1555.  
  1556.        LineWidth pntsize div 1.7320 mul setlinewidth
  1557.        stroke
  1558.  
  1559.       end
  1560.      } def
  1561.    end
  1562.  
  1563.    /pntsize 1155 Frequency div def
  1564.    /FillFont newfont definefont pop
  1565.    /FillFont findfont pntsize scalefont setfont
  1566.  
  1567.    eoclip
  1568.    BackgroundGray 0 ge
  1569.       { BackgroundGray 100 div 1 exch sub setgray fill }
  1570.       { newpath } ifelse
  1571.  
  1572.    ForegroundGray 100 div 1 exch sub setgray
  1573.  
  1574.    Bblly pntsize Bbury
  1575.      { Bbllx 1 index moveto
  1576.        { (a) show
  1577.          currentpoint
  1578.          dup 3 index sub
  1579.          pntsize 2 div gt { pntsize sub } if
  1580.          1 index Bburx gt
  1581.          {pop pop pop exit} if
  1582.          moveto
  1583.        } loop
  1584.      } for
  1585.    } bind def
  1586.  
  1587. %@Fill
  1588. /Honeycomb %Favos,5, FreqⁿΩncia:=4, FundoCinza:=100, FrenteCinza:=0, Espaτamento(%):=75, LarguraLinha:=5
  1589.    {
  1590.    /LineWidth exch 0 100 InRange def
  1591.    /Scaling exch 10 100 InRange def
  1592.    /FrontGrey exch 0 100 InRange def
  1593.    /BackGrey exch -100 100 InRange def
  1594.    /Frequency exch 1 50 InRange def
  1595.  
  1596.    /newfont 10 dict def
  1597.    newfont begin
  1598.  
  1599.    /FontMatrix [0.5773        0
  1600.                 0                   0.5773
  1601.                 0                   0] def
  1602.    /FontType 3 def
  1603.    /FontBBox [0 0 2 3 sqrt] def
  1604.    /Encoding 256 array def
  1605.    0 1 255 {Encoding exch /.notdef put} for
  1606.  
  1607.    /BuildChar
  1608.      { 1.5  0.8660
  1609.        -0.1 -0.1 2.1 1.8320
  1610.        setcachedevice
  1611.        pop begin
  1612.  
  1613.        0.5  0 moveto
  1614.        1.5  0 lineto
  1615.        2  0.8660 lineto
  1616.        1.5  1.7320 lineto
  1617.        0.5  1.7320 lineto
  1618.        0  0.8660 lineto
  1619.        closepath
  1620.  
  1621.        LineWidth pntsize div 3 sqrt mul setlinewidth
  1622.        stroke
  1623.  
  1624.       end
  1625.      } def
  1626.    end
  1627.  
  1628.    /pntsize 1000 Frequency div cvi def
  1629.  
  1630.    /FillFont newfont definefont pop
  1631.    /FillFont findfont pntsize scalefont setfont
  1632.  
  1633.    /dx Bburx Bbllx sub def
  1634.    /dy Bbury Bblly sub def
  1635.  
  1636.    eoclip newpath
  1637.  
  1638.    currentscreen
  1639.    3 -1 roll
  1640.    pop 120
  1641.    3 1 roll
  1642.    setscreen
  1643.  
  1644.    Bbllx dx 2 div add  Bblly dy 2 div add translate
  1645.  
  1646.    /dx dx 100 mul Scaling div def
  1647.    /dy dy 100 mul Scaling div def
  1648.  
  1649.    Scaling 100 div dup scale
  1650.    100 Scaling div log 10 div 10 exch exp
  1651.    BackGrey 0 100 InRange 100 div  FrontGrey BackGrey sub 1000 div  FrontGrey .1 sub 100 div
  1652.       { 1 exch sub setgray
  1653.       dup dup scale
  1654.       dy 2 div cvi dup pntsize mod pntsize 2 div sub sub neg
  1655.         pntsize   dy pntsize add 2 div
  1656.         { dx 2 div cvi dup pntsize mod pntsize 2 div sub sub neg
  1657.           1 index moveto
  1658.           { (a) show
  1659.             currentpoint
  1660.             dup 3 index sub
  1661.             pntsize 2.1 div gt { pntsize sub } if
  1662.             1 index dx pntsize add 2 div gt
  1663.             { pop pop pop exit } if
  1664.             moveto
  1665.           } loop
  1666.         } for
  1667.       } for
  1668.    pop
  1669.    } bind def
  1670.  
  1671. %@Fill
  1672. /Impact %Fissuras,5, LarguraLinha:=5, CompPasso:=15, ┬nguloMßx:=40, ┬nguloMφn:=10, InφcioAleat≤rio:=0
  1673.    { srand
  1674.    /MinAng exch 2 90 InRange def
  1675.    /MaxAng exch MinAng 90 InRange MinAng wDstChck def
  1676.    /Step exch 10 500 InRange def
  1677.    /Linewidth exch 0 100 InRange def
  1678.  
  1679.    eoclip
  1680.    newpath
  1681.  
  1682.    /dx Bburx Bbllx sub def
  1683.    /dy Bbury Bblly sub def
  1684.    /DifAng MaxAng MinAng sub def
  1685.  
  1686.    Bbllx Bblly translate
  1687.  
  1688.    dx 2 div  dy 2 div  translate
  1689.    Linewidth Step div setlinewidth
  1690.    Step Step scale
  1691.  
  1692.    /theta 0 def
  1693.       { matrix currentmatrix
  1694.       /theta theta rand DifAng mod add MinAng add def
  1695.       theta 360 gt {pop exit} if
  1696.       theta rotate
  1697.       0 0 moveto
  1698.       rand 150 mod 50 add
  1699.          {
  1700.          currentpoint translate
  1701.          rand 120 mod 60 sub theta add dup rotate
  1702.          1 0 lineto
  1703.          neg rotate
  1704.          } repeat
  1705.       stroke
  1706.       setmatrix
  1707.       } loop
  1708.    } bind def
  1709.  
  1710.  
  1711. %@Fill
  1712. /Landscape %Terrenos,4, Profundidade:=6, CinzaMßx:=100, CinzaMφn:=0, InφcioAleat≤rio:=0
  1713.    {
  1714.    srand
  1715.    /MinGrey exch 0 100 InRange def
  1716.    /MaxGrey exch MinGrey 100 InRange def
  1717.    /maxdepth exch 1 7 InRange def
  1718.  
  1719.    /dGrey MaxGrey MinGrey sub 200 div def
  1720.    /AvGrey MaxGrey MinGrey add 200 div def
  1721.  
  1722.    eoclip newpath
  1723.    /depth 0 def
  1724.    /ardepth 2 maxdepth 1 sub exp cvi def
  1725.    /height 1.8 8 maxdepth sub exp def
  1726.  
  1727.    /horz 0 def
  1728.    /vert 0 def
  1729.    /Array ardepth 1 add array def
  1730.    0 1 ardepth
  1731.       { Array exch ardepth 1 add array put
  1732.       } for
  1733.    0 1 ardepth
  1734.       { Array exch get
  1735.       0 1 ardepth
  1736.          { 2 copy 0 put
  1737.          pop
  1738.          } for
  1739.       pop
  1740.       } for
  1741.  
  1742.    /Square
  1743.       {
  1744.       /depth depth 1 add def
  1745.       depth maxdepth eq
  1746.       {
  1747.       Array horz get vert get dup 1 add dup moveto                    %ur
  1748.       Array horz 1 add get vert get dup 1 add lineto             %ul
  1749.       Array horz 1 add get vert 1 add get dup dup lineto         %ll
  1750.       Array horz get vert 1 add get dup 1 add exch lineto             %lr
  1751.       closepath
  1752.       sub
  1753.       dGrey mul AvGrey add
  1754.       setgray
  1755.       fill }
  1756.  
  1757.       {
  1758.       /wd 2 maxdepth depth sub 1 sub exp cvi def
  1759.  
  1760.       Array horz wd 2 mul add get vert wd 2 mul add get
  1761.       Array horz get vert wd 2 mul add get
  1762.       Array horz wd 2 mul add get vert get
  1763.       Array horz get vert get
  1764.  
  1765.       4 copy add add add 4 div
  1766.             rand 50 mod 25 sub height div 2 depth exp div add
  1767.       Array horz wd add get
  1768.             vert wd add 2 index put  pop
  1769.  
  1770.       3 index 2 index add 2 div
  1771.             rand 50 mod 25 sub height div 2 depth exp div add
  1772.       Array horz wd 2 mul add get
  1773.             vert wd add 2 index put   pop
  1774.  
  1775.       3 index 3 index add 2 div
  1776.             rand 50 mod 25 sub height div 2 depth exp div add
  1777.       Array horz wd add get
  1778.             vert wd 2 mul add 2 index put   pop
  1779.  
  1780.       horz 0 eq
  1781.       { 2 index 1 index add 2 div
  1782.             rand 50 mod 25 sub height div 2 depth exp div add
  1783.       Array horz get
  1784.             vert wd add 2 index put    pop
  1785.       } if
  1786.  
  1787.       vert 0 eq
  1788.       { 1 index 1 index add 2 div
  1789.             rand 50 mod 25 sub height div 2 depth exp div add
  1790.       Array horz wd add get
  1791.             vert 2 index put          pop
  1792.       } if
  1793.  
  1794.       pop pop pop pop
  1795.       .5 .5 translate
  1796.       .5 .5 scale
  1797.       Square
  1798.       2 2 scale
  1799.  
  1800.       /horz horz 2 maxdepth depth sub 1 sub exp cvi add def
  1801.       -.5 0 translate
  1802.       .5 .5 scale
  1803.       Square
  1804.       2 2 scale
  1805.       /horz horz 2 maxdepth depth sub 1 sub exp cvi sub def
  1806.  
  1807.       /vert vert 2 maxdepth depth sub 1 sub exp cvi add def
  1808.       .5 -.5 translate
  1809.       .5 .5 scale
  1810.       Square
  1811.       2 2 scale
  1812.       /vert vert 2 maxdepth depth sub 1 sub exp cvi sub def
  1813.  
  1814.       /horz horz 2 maxdepth depth sub 1 sub exp cvi add def
  1815.       /vert vert 2 maxdepth depth sub 1 sub exp cvi add def
  1816.       -.5 0 translate
  1817.       .5 .5 scale
  1818.       Square
  1819.       2 2 scale
  1820.       /horz horz 2 maxdepth depth sub 1 sub exp cvi sub def
  1821.       /vert vert 2 maxdepth depth sub 1 sub exp cvi sub def
  1822.  
  1823.       } ifelse
  1824.       /depth depth 1 sub def
  1825.  
  1826.    } def
  1827.  
  1828.    /dx Bburx Bbllx sub def
  1829.    /dy Bbury Bblly sub def
  1830.    /hyp dx dup mul dy dup mul add sqrt def
  1831.    Bbllx dx 2 div add  Bblly dy 2 div add translate
  1832.    hyp 1.2 mul dup scale
  1833.    45 rotate
  1834.    -.5 -.5 translate
  1835.  
  1836.    currentscreen
  1837.    3 -1 roll
  1838.    pop 120
  1839.    3 1 roll
  1840.    setscreen
  1841.  
  1842.    0 0 0 0
  1843.    Square
  1844.    4{ pop }repeat
  1845.  
  1846.    } bind def
  1847.  
  1848. %@Fill
  1849. /Leaves %Folhas,5, N·mero (pol▓):=50, CinzaMßx:=100, CinzaMφn:=0, TamanhoMßx:=100, TamanhoMφn:=10
  1850.    {
  1851.    /MinSize exch 1 200 InRange def
  1852.    /MaxSize exch MinSize 200 InRange MinSize wDstChck def
  1853.    /MinGrey exch 0 100 InRange def
  1854.    /MaxGrey exch MinGrey 100 InRange def
  1855.    /Number exch 1 250 InRange def
  1856.  
  1857.    eoclip newpath
  1858.    currentscreen
  1859.    3 -1 roll
  1860.    pop 90
  1861.    3 1 roll
  1862.    setscreen
  1863.  
  1864.    /dx Bburx Bbllx sub def
  1865.    /dy Bbury Bblly sub def
  1866.  
  1867.    dx dy mul Number mul 1000000 div cvi
  1868.       {
  1869.       matrix currentmatrix
  1870.  
  1871.       rand dx mod Bbllx add
  1872.       rand dy mod Bblly add
  1873.       translate
  1874.  
  1875.       rand 360 mod
  1876.       rotate
  1877.  
  1878.       MaxSize MinSize eq
  1879.         { Maxsize 10.8 div }
  1880.         { rand MaxSize MinSize sub mod MinSize add 10.8 div } ifelse
  1881.       dup scale
  1882.  
  1883.       17 0 moveto
  1884.       65 -18 106 -13 125 0 curveto
  1885.       106 13  65  18  17 0 curveto
  1886.       gsave
  1887.       MaxGrey MinGrey eq
  1888.         { MaxGrey 100 div }
  1889.         { rand MaxGrey MinGrey sub mod MinGrey add 100 div } ifelse
  1890.       setgray
  1891.       fill
  1892.       grestore
  1893.       0.3 setlinewidth
  1894.       0 setgray
  1895.       stroke
  1896.  
  1897.       setmatrix
  1898.  
  1899.       } repeat
  1900.  
  1901.    } bind def
  1902.  
  1903. %@Fill
  1904. /Mesh %Retφculas,5, FreqⁿΩncia:=6, Tamanho quadradaá(%):=80, Sombra inferior esquerdo:=3, Sombra superior direito:=15, Cinza do primeiro plano:=100
  1905.    {
  1906.    /ForegroundGray exch 0 100 InRange def
  1907.    /Shadow2 exch 0 100 InRange def
  1908.    /Shadow1 exch 0 100 InRange def
  1909.    /SquareSize exch 1 100 InRange def
  1910.    /Frequency exch 1 25 InRange def
  1911.  
  1912.    /newfont 10 dict def
  1913.    newfont begin
  1914.  
  1915.    /FontMatrix [1         0
  1916.                 0         1
  1917.                 0         0] def
  1918.    /FontType 3 def
  1919.    /FontBBox [0 0 1 1] def
  1920.    /Encoding 256 array def
  1921.    0 1 255 {Encoding exch /.notdef put} for
  1922.  
  1923.    /BuildChar
  1924.      { 1  0
  1925.        -0.1 -0.1 1.1 1.1
  1926.        setcachedevice
  1927.        pop begin
  1928.  
  1929.        0 setlinejoin
  1930.  
  1931.        SquareSize 100 div dup scale
  1932.        0 0 moveto
  1933.        1 0 lineto
  1934.        1 1 lineto
  1935.        0 1 lineto
  1936.        closepath
  1937.  
  1938.        Shadow1 100 div
  1939.        1 Shadow2 100 div sub
  1940.        1 index dup moveto
  1941.        1 index 1 index lineto
  1942.        dup dup lineto
  1943.        dup 2 index lineto
  1944.        closepath
  1945.        2{pop}repeat
  1946.        fill
  1947.  
  1948.        end
  1949.      } def
  1950.    end
  1951.  
  1952.    /pntsize 1000 Frequency div def
  1953.  
  1954.    /FillFont newfont definefont pop
  1955.    /FillFont findfont pntsize scalefont setfont
  1956.  
  1957.    eoclip newpath
  1958.  
  1959.    ForegroundGray 100 div 1 exch sub setgray
  1960.  
  1961.    Bblly pntsize Bbury
  1962.      { Bbllx exch moveto
  1963.        { (a) show
  1964.          currentpoint
  1965.          pop Bburx gt
  1966.          {exit} if
  1967.        } loop
  1968.      } for
  1969.    } bind def
  1970.  
  1971. %@Fill
  1972. /Motifs %Motivos,4, Motif:=1, FreqⁿΩncia:=2, Espaτamento(%):=100, PrimeiroPlanoCinza:=100
  1973.    {
  1974.    /ForegroundGray exch 0 100 InRange def
  1975.    /Spacing exch 1 300 InRange def
  1976.    /Frequency exch 1 25 InRange def
  1977.    /Character exch 1 8 InRange def
  1978.  
  1979.    /str 1 string def
  1980.    str 0 Character put
  1981.  
  1982.    /newfont 10 dict def
  1983.    newfont begin
  1984.  
  1985.    /FontMatrix [.001                0
  1986.                 0                   .001
  1987.                 0                   0] def
  1988.    /FontType 3 def
  1989.    /FontBBox [0 0 500 1000] def
  1990.  
  1991.    /Encoding 256 array def
  1992.    0 1 255 {Encoding exch /.notdef put} for
  1993.    Encoding  1 /CanadianFlag put
  1994.    Encoding  2 /Corels put
  1995.    Encoding  3 /Globe put
  1996.    Encoding  4 /CubeSolid put
  1997.    Encoding  5 /CubeFrame put
  1998.    Encoding  6 /Balls put
  1999.    Encoding  7 /Checkerboard put
  2000.    Encoding  8 /CCCTlogo put
  2001.  
  2002.    /CharProcs 9 dict def
  2003.    CharProcs begin
  2004.    /.notdef {} def
  2005.    /CanadianFlag
  2006.      { 9.6 9.6 scale
  2007.        9 -30 translate
  2008.  
  2009.        -9 60 moveto
  2010.        -9 30 lineto
  2011.        -1 30 lineto
  2012.        -1 60 lineto
  2013.        closepath
  2014.  
  2015.        43 60 moveto
  2016.        43 30 lineto
  2017.        35 30 lineto
  2018.        35 60 lineto
  2019.        closepath
  2020.  
  2021.        17 58 moveto
  2022.        15 54 lineto
  2023.        12 55 lineto
  2024.        14 47 lineto
  2025.        10 51 lineto
  2026.        10 49 lineto
  2027.        05 50 lineto
  2028.        07 45 lineto
  2029.        05 45 lineto
  2030.        12 39 lineto
  2031.        10 37 lineto
  2032.        16.5 38 lineto
  2033.        16.5 32 lineto
  2034.        17.5 32 lineto
  2035.        17.5 38 lineto
  2036.        24 37 lineto
  2037.        22 39 lineto
  2038.        29 45 lineto
  2039.        27 45 lineto
  2040.        29 50 lineto
  2041.        24 49 lineto
  2042.        24 51 lineto
  2043.        20 47 lineto
  2044.        22 55 lineto
  2045.        19 54 lineto
  2046.        closepath
  2047.  
  2048. %       0.3 setlinewidth
  2049. %       stroke
  2050.        fill
  2051.        } def
  2052.    /Corels
  2053.        { 250 250 translate
  2054.        113 113 scale
  2055.  
  2056.        7 { 45 rotate
  2057.          gsave
  2058.          1.7071 0 translate
  2059.          .5 .5 moveto
  2060.          -.5 .5 lineto
  2061.          -.5 -.5 lineto
  2062.          .5 -.5 lineto
  2063.          closepath
  2064.          fill
  2065.          grestore
  2066.          } repeat
  2067.        } def
  2068.    /Globe
  2069.        {
  2070.        250 250 translate
  2071.        250 250 scale
  2072.        0 1 4
  2073.           { matrix currentmatrix exch
  2074.           22.5 mul sin
  2075.           1 scale
  2076.           0 0 1 90 450 arc
  2077.           setmatrix
  2078.           } for
  2079.  
  2080.        -3 1 3
  2081.           { 22.5 mul sin
  2082.           dup
  2083.           dup mul 1 sub neg sqrt
  2084.           dup neg 2 index moveto
  2085.           exch lineto
  2086.           } for
  2087.  
  2088.        .01 setlinewidth
  2089.        stroke
  2090.        } def
  2091.    /CubeSolid
  2092.        {
  2093.        250 250 translate
  2094.        145 145 scale
  2095.        /Rotm
  2096.           { 30 matrix rotate transform
  2097.           exch 3 1 roll
  2098.           30 matrix rotate transform
  2099.           pop exch
  2100.           moveto
  2101.           } bind def
  2102.        /Rotl
  2103.           { 30 matrix rotate transform
  2104.           exch 3 1 roll
  2105.           30 matrix rotate transform
  2106.           pop exch
  2107.           lineto
  2108.           } bind def
  2109.  
  2110.         1  1  1 Rotm
  2111.        -1  1  1 Rotl
  2112.        -1 -1  1 Rotl
  2113.         1 -1  1 Rotl
  2114.        closepath
  2115.  
  2116.        -1  1  1 Rotm
  2117.        -1  1 -1 Rotl
  2118.         1  1 -1 Rotl
  2119.         1 -1 -1 Rotl
  2120.         1 -1  1 Rotl
  2121.  
  2122.         1  1  1 Rotm
  2123.         1  1 -1 Rotl
  2124.  
  2125.        .01 setlinewidth
  2126.        stroke
  2127.        } def
  2128.    /CubeFrame
  2129.        {
  2130.        250 250 translate
  2131.        145 145 scale
  2132.        /Rotm
  2133.           { 30 matrix rotate transform
  2134.           exch 3 1 roll
  2135.           30 matrix rotate transform
  2136.           pop exch
  2137.           moveto
  2138.           } bind def
  2139.        /Rotl
  2140.           { 30 matrix rotate transform
  2141.           exch 3 1 roll
  2142.           30 matrix rotate transform
  2143.           pop exch
  2144.           lineto
  2145.           } bind def
  2146.  
  2147.         1  1  1 Rotm
  2148.        -1  1  1 Rotl
  2149.        -1 -1  1 Rotl
  2150.         1 -1  1 Rotl
  2151.        closepath
  2152.  
  2153.         1  1 -1 Rotm
  2154.        -1  1 -1 Rotl
  2155.        -1 -1 -1 Rotl
  2156.         1 -1 -1 Rotl
  2157.        closepath
  2158.  
  2159.         1  1  1 Rotm
  2160.         1  1 -1 Rotl
  2161.        -1  1  1 Rotm
  2162.        -1  1 -1 Rotl
  2163.        -1 -1  1 Rotm
  2164.        -1 -1 -1 Rotl
  2165.         1 -1  1 Rotm
  2166.         1 -1 -1 Rotl
  2167.  
  2168.        .01 setlinewidth
  2169.        stroke
  2170.        } def
  2171.    /Balls
  2172.        { 250 250 translate
  2173.        225 225 scale
  2174.  
  2175.        0 0 1.1 0 360 arc
  2176.        -0.32  0.55 translate
  2177.        30 rotate
  2178.        0.5 0.3333 scale
  2179.        0 0 1.1 360 0 arcn
  2180.        fill
  2181.        } def
  2182.    /Checkerboard
  2183.        { 0 0 moveto
  2184.        500 0 lineto
  2185.        500 500 lineto
  2186.        0 500 lineto
  2187.        closepath
  2188.        fill
  2189.        } def
  2190.    /CCCTlogo
  2191.        {
  2192.        4.8 4.8 scale
  2193.        -21 -26 translate
  2194.  
  2195.        36.4 28.4 moveto
  2196.        70 38 35 196 176.7 arcn
  2197.        35.1 40 35 42 24 41 curveto
  2198.        21 37 24 38 22 32 curveto
  2199.        21 28 25 27 28 28 curveto
  2200.        33 26 32 30 36.4 28.4 curveto
  2201.  
  2202.        36.5 48.2 moveto
  2203.        70 38 35 163.1 144.5 arcn
  2204.        40 59 39 60 36 61 curveto
  2205.        33 63 29 62 27 61 curveto
  2206.        24 58 29 55 26 54 curveto
  2207.        24 53 25 50 25 50 curveto
  2208.        28 47 30 44 36.5 48.2 curveto
  2209.  
  2210.        44.3 61.7 moveto
  2211.        70 38 35 137.3 111.5 arcn
  2212.        56 81 52 75 53 81 curveto
  2213.        52 87 50 81 46 84 curveto
  2214.        37 84 40 80 40 76 curveto
  2215.        42 70 35 73 44.3 61.7 curveto
  2216.  
  2217.        60.8 71.8 moveto
  2218.        70 38 35 105.3 80.0 arcn
  2219.        78 72 78 76 77 80 curveto
  2220.        77 81 80 82 79 83 curveto
  2221.        77 85 74 84 70 85 curveto
  2222.        65 85 69 80 62 80 curveto
  2223.        59 77 61 74 60.8 71.8 curveto
  2224.  
  2225.        97.1 60.1 moveto
  2226.        70 38 35 39.2 66.4 arc
  2227.        81 74 82 78 85 81 curveto
  2228.        91 81 98 84 95 76 curveto
  2229.        98 74 115 77 103 72 curveto
  2230.        101 68 100 61 97.1 60.1 curveto
  2231.  
  2232.        100 56 moveto
  2233.        70 38 35 31 11.6 arcn
  2234.        113 42 114 49 118 50 curveto
  2235.        115 57 123 56 120 60 curveto
  2236.        115 60 116 64 109 63 curveto
  2237.        104 62 107 57 100 56 curveto
  2238.  
  2239.        105 39 moveto
  2240.        70 38 35 1.6 -14.8 arcn
  2241.        107 27 110 28 112 27 curveto
  2242.        115 27 111 31 118 32 curveto
  2243.        120 33 125 33 122 36 curveto
  2244.        121 37 119 38 117 39 curveto
  2245.        113 46 112 39 105 39 curveto
  2246.  
  2247.        fill
  2248.     } def
  2249.    end
  2250.  
  2251.    /BuildChar
  2252.      {Spacing 100 div 500 mul  dup
  2253.       -0.1 -0.1 500.1 1000.1
  2254.       setcachedevice
  2255.       exch begin
  2256.       Encoding exch get
  2257.       CharProcs exch get
  2258.       end
  2259.       exec
  2260.      }def
  2261.    end
  2262.  
  2263.    /pntsize 100000 Frequency div Spacing div def
  2264.  
  2265.    /FillFont newfont definefont pop
  2266.    /FillFont findfont pntsize scalefont setfont
  2267.  
  2268.    /increment Spacing 100 div pntsize mul def
  2269.    /ury Bbury increment add def
  2270.  
  2271.    eoclip newpath
  2272.    ForegroundGray 100 div 1 exch sub setgray
  2273.    Bblly increment ury
  2274.      { Bbllx 1 index moveto
  2275.        { str show
  2276.          currentpoint
  2277.          dup 3 index sub
  2278.          increment 2.1 div gt { increment sub } if
  2279.          1 index Bburx gt
  2280.          {pop pop pop exit} if
  2281.          moveto
  2282.        } loop
  2283.      } for
  2284.    } bind def
  2285.  
  2286. %@Fill
  2287. /Octagons %Octßgonos,4, FreqⁿΩncia:=8, LarguraLinha:=5, PrimeiroPlanoCinza:=100, FundoCinza:=0
  2288.    {
  2289.    /BackgroundGray exch -1 100 InRange def
  2290.    /ForegroundGray exch 0 100 InRange def
  2291.    /Linewidth      exch 0 100 InRange def
  2292.    /Frequency      exch 2 100 InRange def
  2293.  
  2294.    /newfont 10 dict def
  2295.    newfont begin
  2296.  
  2297.    /FontMatrix [0.4142                          0
  2298.                 0                   0.4142
  2299.                 0                   0] def
  2300.    /FontType 3 def
  2301.    /FontBBox [0 0 2.4142 2.4142] def
  2302.    /Encoding 256 array def
  2303.    0 1 255 {Encoding exch /.notdef put} for
  2304.  
  2305.    /BuildChar
  2306.      { 2.4142  0
  2307.        -0.5 -0.5 2.9142 2.9142
  2308.        setcachedevice
  2309.        pop begin
  2310.  
  2311.        0.7071  0 moveto
  2312.        1.7071  0 lineto
  2313.        2.4142  0.7071 lineto
  2314.        2.4142  1.7071 lineto
  2315.        1.7071  2.4142 lineto
  2316.        0.7071  2.4142 lineto
  2317.        0  1.7071 lineto
  2318.        0  0.7071 lineto
  2319.        closepath
  2320.  
  2321.        Linewidth pntsize div 2.4142 mul setlinewidth
  2322.        stroke
  2323.  
  2324.       end
  2325.      } def
  2326.    end
  2327.  
  2328.    /pntsize 1000 Frequency div def
  2329.    /FillFont newfont definefont pop
  2330.    /FillFont findfont pntsize scalefont setfont
  2331.  
  2332.    eoclip
  2333.    BackgroundGray 0 ge
  2334.       { BackgroundGray 100 div 1 exch sub setgray fill }
  2335.       { newpath } ifelse
  2336.  
  2337.    ForegroundGray 100 div 1 exch sub setgray
  2338.  
  2339.    Bblly pntsize Bbury
  2340.      { Bbllx pntsize Bburx
  2341.        { 1 index moveto
  2342.        (a) show
  2343.        } for
  2344.      pop
  2345.      } for
  2346.    } bind def
  2347.  
  2348. %@Fill
  2349. /Patio %Trio,4, FreqⁿΩncia:=8, LarguraLinha:=5, PrimeiroPlanoCinza:=100, FundoCinza:=0
  2350.    {
  2351.    /BackgroundGray exch -1 100 InRange def
  2352.    /ForegroundGray exch 0 100 InRange def
  2353.    /Linewidth      exch 0 100 InRange def
  2354.    /Frequency      exch 2 100 InRange def
  2355.  
  2356.    /newfont 10 dict def
  2357.    newfont begin
  2358.  
  2359.    /FontMatrix [0.2857              0
  2360.                 0                   0.2857
  2361.                 0                   0] def
  2362.    /FontType 3 def
  2363.    /FontBBox [0 0 3.4641  3.5] def
  2364.    /Encoding 256 array def
  2365.    0 1 255 {Encoding exch /.notdef put} for
  2366.  
  2367.    /BuildChar
  2368.      { 2.5980  1.5
  2369.        -0.5 -0.5 3.9641 4
  2370.        setcachedevice
  2371.        pop begin
  2372.  
  2373.        1.7320 1.5 translate
  2374.        0.8660  0.5  moveto
  2375.        3 { 120 rotate
  2376.            0.8660  -1.5 lineto
  2377.            1.7320  -1 lineto
  2378.            1.7320   0 lineto
  2379.            0.8660   0.5 lineto
  2380.          } repeat
  2381.  
  2382.        Linewidth pntsize div 3.5 mul setlinewidth
  2383.        stroke
  2384.  
  2385.        end
  2386.      } def
  2387.    end
  2388.  
  2389.    /pntsize 1250 Frequency div def
  2390.  
  2391.    /FillFont newfont definefont pop
  2392.    /FillFont findfont pntsize scalefont setfont
  2393.  
  2394.    /Pointsize pntsize 6 mul 7 div def
  2395.  
  2396.    eoclip
  2397.    BackgroundGray 0 ge
  2398.       { BackgroundGray 100 div 1 exch sub setgray fill }
  2399.       { newpath } ifelse
  2400.  
  2401.    ForegroundGray 100 div 1 exch sub setgray
  2402.  
  2403.    Bblly Pointsize Bbury
  2404.      { Bbllx 1 index moveto
  2405.        { (a) show
  2406.          currentpoint
  2407.          dup 3 index sub
  2408.          Pointsize 2 div gt { Pointsize sub } if
  2409.          1 index Bburx gt
  2410.          {pop pop pop exit} if
  2411.          moveto
  2412.        } loop
  2413.      } for
  2414.    } bind def
  2415.  
  2416. %@Fill
  2417. /Rectangles %RetΓngulos,5, ┴rea:=100, N·mero:=50, LarguraLinha:=5, Cinza:=0, InφcioAleat≤rio:=0
  2418.    {
  2419.    srand
  2420.    /Grey exch 0 100 InRange def
  2421.    /Linewidth exch 0 100 InRange def
  2422.    /Number exch 1 200 InRange def
  2423.    /area exch 10 300 InRange def
  2424.  
  2425.    /dx Bburx Bbllx sub 2 mul def
  2426.    /dy Bbury Bblly sub 2 mul def
  2427.    /Area area 10000 mul def
  2428.  
  2429.    eoclip newpath
  2430.  
  2431.    Linewidth setlinewidth
  2432.    Bbllx dx 2 div sub  Bblly dy 2 div sub  translate
  2433.  
  2434. %   Area log
  2435.    Number {
  2436.       rand dx mod rand dy mod moveto
  2437. %      rand 180 mod 90 sub 100 div dup  dup mul 1 exch sub sqrt
  2438. %      exch atan 180 div 1 index mul 10 exch exp
  2439.       rand Area mod rand Area mod mul sqrt sqrt
  2440.       dup 0 rlineto
  2441.       0 Area 2 index div rlineto
  2442.       dup neg 0 rlineto
  2443.       closepath
  2444.       pop
  2445.  
  2446.       gsave
  2447.       Grey 100 div 1 exch sub setgray
  2448.       fill
  2449.       grestore
  2450.       0 setgray
  2451.       stroke
  2452.       } repeat
  2453.  
  2454.    } bind def
  2455.  
  2456. %@Fill
  2457. /Reptiles %RΘpteis,5, FreqⁿΩncia:=4, Cinza1:=60, Cinza2:=30, Cinza3:=0, LarguraLinha:=8
  2458. {
  2459.   /LineWidth exch 0 250 InRange def
  2460.   /Gray3 exch 0 100 InRange 100 div def
  2461.   /Gray2 exch -1 100 InRange 100 div def
  2462.   /Gray1 exch -1 100 InRange 100 div def
  2463.   /Frequency exch 1 100 InRange def
  2464.  
  2465.   /newfont 10 dict def
  2466.   newfont begin
  2467.  
  2468.   /FontMatrix [0.2857              0
  2469.                0                   0.2857
  2470.                0                   0] def
  2471.   /FontType 3 def
  2472.   /FontBBox [-1.73 -1.86 2.36 2.0] def
  2473.   /Encoding 256 array def
  2474.   0 1 255 {Encoding exch /.notdef put} for
  2475.   Encoding 97 /ReptilesStroked put
  2476.   Encoding 98 /ReptileFilled put
  2477.  
  2478.   /CharProcs 3 dict def
  2479.   CharProcs begin
  2480.   /.notdef {} def
  2481.   /ReptilesStroked
  2482.   {
  2483.     %3 sqrt  1.5  translate
  2484.  
  2485.     0.8660 0.5  moveto
  2486.     3
  2487.     {
  2488.       120 rotate
  2489.  
  2490.       0     0    moveto
  2491.       0.32 -0.40 lineto
  2492.       0.32 -0.48 lineto
  2493.       0    -0.72 lineto
  2494.  
  2495.       0.05 -1.03 moveto
  2496.       0.4  -0.76 lineto
  2497.       0.84 -0.84 lineto
  2498.       0.5  -0.96 lineto
  2499.       0.31 -1.18 lineto
  2500.  
  2501.       0.87 -1.5  moveto
  2502.       0.58 -1.28 lineto
  2503.       0.8  -1.14 lineto
  2504.       0.94 -1.18 lineto
  2505.       1.24 -1.08 lineto
  2506.       1.42 -1.18 lineto
  2507.  
  2508.       1.68 -1.02 moveto
  2509.       1.52 -0.84 lineto
  2510.       1.64 -0.66 lineto
  2511.       1.73 -0.36 lineto
  2512.  
  2513.       1.73  0    moveto
  2514.       1.41 -0.26 lineto
  2515.       1.32 -0.49 lineto
  2516.       1.06 -0.24 lineto
  2517.       1.42  0.18 lineto
  2518.  
  2519.       0.87  0.57 moveto
  2520.       0.87  0.26 lineto
  2521.       0.99  0.26 lineto
  2522.       1.05  0.12 lineto
  2523.       0.82 -0.07 lineto
  2524.       0.68 -0.07 lineto
  2525.       0.62  0.36 lineto
  2526.  
  2527.  
  2528.       0.8660  0.5 moveto
  2529.  
  2530.     } repeat
  2531.  
  2532.     LineWidth Pointsize div 3.5 mul setlinewidth
  2533.     stroke
  2534.  
  2535.   } def
  2536.   /ReptileFilled
  2537.   {
  2538.     0     0    moveto
  2539.     0.32 -0.40 lineto
  2540.     0.32 -0.48 lineto
  2541.     0    -0.72 lineto
  2542.  
  2543.    -0.40 -0.55 lineto
  2544.    -0.47 -0.68 lineto
  2545.    -0.42 -0.97 lineto
  2546.    -0.27 -0.99 lineto
  2547.    -0.21 -0.88 lineto
  2548.  
  2549.     0.05 -1.03 lineto
  2550.     0.4  -0.76 lineto
  2551.     0.84 -0.84 lineto
  2552.     0.5  -0.96 lineto
  2553.     0.31 -1.18 lineto
  2554.  
  2555.     0.32 -1.39 lineto
  2556.     0.55 -1.60 lineto
  2557.     0.59 -1.74 lineto
  2558.     0.82 -1.86 lineto
  2559.  
  2560.     0.87 -1.5  lineto
  2561.     0.58 -1.28 lineto
  2562.     0.8  -1.14 lineto
  2563.     0.94 -1.18 lineto
  2564.     1.24 -1.08 lineto
  2565.     1.42 -1.18 lineto
  2566.     1.52 -1.45 lineto
  2567.     1.45 -1.81 lineto
  2568.     1.74 -1.47 lineto
  2569.     1.68 -1.02 lineto
  2570.     1.52 -0.84 lineto
  2571.     1.64 -0.66 lineto
  2572.     1.73 -0.36 lineto
  2573.     2.28 -0.46 lineto
  2574.     2.36 -0.11 lineto
  2575.     2.12 -0.15 lineto
  2576.     1.73  0    lineto
  2577.     1.41 -0.26 lineto
  2578.     1.32 -0.49 lineto
  2579.     1.06 -0.24 lineto
  2580.     1.42  0.18 lineto
  2581.     1.21  0.41 lineto
  2582.     1.11  0.60 lineto
  2583.  
  2584.     0.87  0.57 lineto
  2585.     0.87  0.26 lineto
  2586.     0.99  0.26 lineto
  2587.     1.05  0.12 lineto
  2588.     0.82 -0.07 lineto
  2589.     0.68 -0.07 lineto
  2590.     0.62  0.36 lineto
  2591.     0.26  0.52 lineto
  2592.     0.19  0.48 lineto
  2593.     closepath
  2594.     fill
  2595.   } def
  2596.   end
  2597.  
  2598.   /BuildChar
  2599.   {
  2600.     2.5980 1.5
  2601.     -1.83 -1.96 2.46 2.1
  2602.     setcachedevice
  2603.     exch begin
  2604.     Encoding exch get
  2605.     CharProcs exch get
  2606.     end
  2607.     exec
  2608.   } def
  2609.   end
  2610.  
  2611.   /Pointsize 2000 Frequency div def
  2612.  
  2613.   /FillFont newfont definefont pop
  2614.   /FillFont findfont Pointsize scalefont setfont
  2615.  
  2616.   /pntsize Pointsize 6 mul 7 div def
  2617.   /HeightDiff Pointsize 2 mul 7 div .49 mul def
  2618.  
  2619.   eoclip newpath
  2620.  
  2621.   currentscreen
  2622.   3 -1 roll
  2623.   pop 120
  2624.   3 1 roll
  2625.   setscreen
  2626.  
  2627.   Bblly pntsize Bbury pntsize add HeightDiff add
  2628.   {
  2629.     Bbllx 1 index moveto
  2630.     {
  2631.       currentpoint
  2632.       1 index exch
  2633.  
  2634.       2 copy 2 copy translate
  2635.       240 rotate
  2636.       Gray1 0 ge
  2637.       { Gray1 1 exch sub setgray
  2638.         (b) show
  2639.       } if
  2640.       0 0 moveto
  2641.       -240 rotate
  2642.       neg exch neg exch translate
  2643.  
  2644.       2 copy translate
  2645.       120 rotate
  2646.       Gray2 0 ge
  2647.       { Gray2 1 exch sub setgray
  2648.         (b) show
  2649.       } if
  2650.       0 0 moveto
  2651.       -120 rotate
  2652.       neg exch neg exch translate
  2653.  
  2654.       Gray3 1 exch sub setgray
  2655.       (b) show
  2656.  
  2657.       currentpoint
  2658.       dup 4 index sub
  2659.       pntsize 2.1 div gt { pntsize sub } if
  2660.       3 -1 roll Bburx gt
  2661.       {pop pop pop exit} if
  2662.       moveto
  2663.     } loop
  2664.   } for
  2665.  
  2666.   LineWidth 0 gt
  2667.   {
  2668.     0 setgray
  2669.     Bblly pntsize Bbury pntsize add
  2670.     {
  2671.       Bbllx 1 index moveto
  2672.       {
  2673.         (a) show
  2674.         currentpoint
  2675.         dup 3 index sub
  2676.         pntsize 2.1 div gt { pntsize sub } if
  2677.         1 index Bburx gt
  2678.         {pop pop pop exit} if
  2679.         moveto
  2680.       } loop
  2681.     } for
  2682.   } if
  2683. } bind def
  2684.  
  2685. %@Fill
  2686. /SpiderWeb %Teias,5, LarguraLinha:=5, Separation:=300, ┬nguloMßx:=40, ┬nguloMφn:=10, InφcioAleat≤rio:=0
  2687.    { srand
  2688.    /MinAng exch 2 90 InRange def
  2689.    /MaxAng exch MinAng 90 InRange MinAng wDstChck def
  2690.    /Sep exch 10 500 InRange def
  2691.    /Linewidth exch 0 100 InRange def
  2692.  
  2693.    eoclip
  2694.    newpath
  2695.  
  2696.    /dx Bburx Bbllx sub def
  2697.    /dy Bbury Bblly sub def
  2698.    /hyp dx dup mul dy dup mul add sqrt def
  2699.    /DifAng MaxAng MinAng sub def
  2700.  
  2701.    Bbllx Bblly translate
  2702.    dx 2 div dy 2 div translate
  2703.  
  2704.    /theta 0 def
  2705.    /dtheta 0 def
  2706.  
  2707.    {  0 0 moveto
  2708.  
  2709.       /theta theta dtheta add def
  2710.       theta 360 ge
  2711.         { exit } if
  2712.       /dtheta rand DifAng mod MinAng add def
  2713.       theta dtheta add 350 gt
  2714.         { /dtheta 360 theta sub def } if
  2715.  
  2716.       hyp theta cos mul hyp theta sin mul lineto
  2717.  
  2718.       0 Sep hyp
  2719.          {
  2720.          dup theta cos mul
  2721.          1 index theta sin mul
  2722.          moveto
  2723.  
  2724.          dup theta dtheta add cos theta cos add mul
  2725.          1 index theta dtheta add sin theta sin add mul
  2726.          2 index
  2727.          theta 180 add dtheta add
  2728.          theta 180 add
  2729.          arcn
  2730.  
  2731.          pop
  2732.          } for
  2733.       Linewidth setlinewidth
  2734.       stroke
  2735.       } loop
  2736.    } bind def
  2737.  
  2738. %@Fill
  2739. /Spirals %Espirais,4, Tamanho:=150, LarguraLinha:=5, PrimeiroPlanoCinza:=100, FundoCinza:=0
  2740.    {
  2741.    /BackgroundGrey exch -1 100 InRange def
  2742.    /ForegroundGray exch 0 100 InRange def
  2743.    /Linewidth exch 0 100 InRange def
  2744.    /Size exch 10 500 InRange def
  2745.  
  2746.    eoclip
  2747.    BackgroundGrey 0 ge
  2748.       { BackgroundGrey 100 div 1 exch sub setgray fill }
  2749.       { newpath } ifelse
  2750.  
  2751.    /cx Bburx Bbllx add 2 div def
  2752.    /cy Bbury Bblly add 2 div def
  2753.    /pntsize2 Size 2 div def
  2754.    /cy2 cy pntsize2 add def
  2755.    /hyp Bburx Bbllx sub dup mul
  2756.         Bbury Bblly sub dup mul
  2757.         add sqrt 2 div def
  2758.  
  2759.    ForegroundGray 100 div 1 exch sub setgray
  2760.  
  2761.    Linewidth setlinewidth
  2762.    0 Size hyp
  2763.       { cx cy 2 index 90 270 arc
  2764.         cx cy2 2 index pntsize2 add -90 90 arc
  2765.         pop
  2766.       } for
  2767.    stroke
  2768.    } bind def
  2769.  
  2770. %@Fill
  2771. /Spokes %Raios,5, N·mero:=120, LarguraLinha:=5, Horizontal:=0, Vertical:=0, PrimeiroPlanoCinza:=100
  2772.     { %def -- Fill function that fills with spokes
  2773.         /ForegroundGray exch 0 100 InRange def
  2774.     /wY exch 0 100 InRange def
  2775.     /wX exch 0 100 InRange def
  2776.     /LineWidth exch 0 100 InRange def
  2777.     /Number exch 4 360 InRange def
  2778.  
  2779.         eoclip
  2780.         newpath
  2781.         /Flen Bburx Bbllx sub dup mul Bbury Bblly sub dup mul add sqrt def
  2782.         Bbllx Bblly translate
  2783.     Bburx Bbllx sub wX mul 100 div  Bbury Bblly sub wY mul 100 div translate
  2784.  
  2785.     360 Number div
  2786.         Number {
  2787.            0 0 moveto
  2788.            Flen 0 lineto
  2789.            dup rotate
  2790.            } repeat
  2791.         pop
  2792.         ForegroundGray 100 div 1 exch sub setgray
  2793.     LineWidth setlinewidth
  2794.     stroke
  2795.         } bind def
  2796.  
  2797. %@Fill
  2798. /Squares %Quadrados,4, FreqⁿΩncia:=8, LarguraLinha:=5, PrimeiroPlanoCinza:=100, FundoCinza:=0
  2799.    {
  2800.    /BackgroundGray exch -1 100 InRange def
  2801.    /ForegroundGray exch 0 100 InRange def
  2802.    /Linewidth      exch 0 100 InRange def
  2803.    /Frequency      exch 2 100 InRange def
  2804.  
  2805.    /newfont 10 dict def
  2806.    newfont begin
  2807.  
  2808.    /FontMatrix [1  0  0
  2809.                 1  0  0] def
  2810.    /FontType 3 def
  2811.    /FontBBox [0 0 1 1] def
  2812.    /Encoding 256 array def
  2813.    0 1 255 {Encoding exch /.notdef put} for
  2814.  
  2815.    /BuildChar
  2816.      { 1  0
  2817.        -0.1 -0.1 1.1 1.1
  2818.        setcachedevice
  2819.        pop begin
  2820.  
  2821.        0 0 moveto
  2822.        0 1 lineto
  2823.        1 1 lineto
  2824.        1 0 lineto
  2825.  
  2826.        Linewidth pntsize div setlinewidth
  2827.        stroke
  2828.  
  2829.       end
  2830.      } def
  2831.    end
  2832.  
  2833.    /pntsize 1000 Frequency div def
  2834.  
  2835.    /FillFont newfont definefont pop
  2836.    /FillFont findfont pntsize scalefont setfont
  2837.  
  2838.    eoclip
  2839.    BackgroundGray 0 ge
  2840.       { BackgroundGray 100 div 1 exch sub setgray fill }
  2841.       { newpath } ifelse
  2842.  
  2843.    ForegroundGray 100 div 1 exch sub setgray
  2844.  
  2845.    Bblly pntsize Bbury
  2846.      { Bbllx exch moveto
  2847.        { (a) show
  2848.          currentpoint
  2849.          pop Bburx gt
  2850.          {exit} if
  2851.        } loop
  2852.      } for
  2853.    } bind def
  2854.  
  2855. %@Fill
  2856. /StarOfDavid %EstreladeDavi,4, FreqⁿΩncia:=8, LarguraLinha:=5, PrimeiroPlanoCinza:=100, FundoCinza:=0
  2857.    {
  2858.    /BackgroundGray exch -1 100 InRange def
  2859.    /ForegroundGray exch 0 100 InRange def
  2860.    /Linewidth      exch 0 100 InRange def
  2861.    /Frequency      exch 2 100 InRange def
  2862.  
  2863.    /newfont 10 dict def
  2864.    newfont begin
  2865.  
  2866.    /FontMatrix [0.2886   0
  2867.                 0                   0.2886
  2868.                 0                   0] def
  2869.    /FontType 3 def
  2870.    /FontBBox [0 0 2 3.4641] def
  2871.    /Encoding 256 array def
  2872.    0 1 255 {Encoding exch /.notdef put} for
  2873.  
  2874.    /BuildChar
  2875.      { 1  1.7320
  2876.        -0.1 -0.1 2.1 3.564
  2877.        setcachedevice
  2878.        pop begin
  2879.  
  2880.        0.5  0 moveto
  2881.        1.5  0 lineto
  2882.        2  0.8660 lineto
  2883.        1.5  1.7320 lineto
  2884.        0.5  1.7320 lineto
  2885.        0  0.8660 lineto
  2886.        closepath
  2887.  
  2888.        Linewidth pntsize div 3.4641 mul setlinewidth
  2889.        stroke
  2890.  
  2891.       end
  2892.      } def
  2893.    end
  2894.  
  2895.    /pntsize 1732 Frequency div def
  2896.  
  2897.    /FillFont newfont definefont pop
  2898.    /FillFont findfont pntsize scalefont setfont
  2899.  
  2900.    eoclip
  2901.    BackgroundGray 0 ge
  2902.       { BackgroundGray 100 div 1 exch sub setgray fill }
  2903.       { newpath } ifelse
  2904.  
  2905.    ForegroundGray 100 div 1 exch sub setgray
  2906.  
  2907.    /ury Bbury pntsize add def
  2908.    Bblly pntsize ury
  2909.      { Bbllx pntsize sub 1 index moveto
  2910.        { (a) show
  2911.          currentpoint
  2912.          dup 3 index sub
  2913.          pntsize 2.1 div gt { pntsize sub } if
  2914.          1 index Bburx gt
  2915.          {pop pop pop exit} if
  2916.          moveto
  2917.        } loop
  2918.      } for
  2919.    } bind def
  2920.  
  2921. %@Fill
  2922. /Stars %Estrelas,4, N·mero:=100, TamanhoMßx:=300, TamanhoMφn:=3, InφcioAleat≤rio:=0
  2923.    { srand
  2924.    /MinSize exch 1 1000 InRange def
  2925.    /MaxSize exch MinSize 1000 InRange def
  2926.    /Number exch 1 2000 InRange def
  2927.  
  2928.    /newfont 10 dict def
  2929.    newfont begin
  2930.  
  2931.    /FontMatrix [1  0  0
  2932.                 1  0  0] def
  2933.    /FontType 3 def
  2934.    /FontBBox [0 0 1 1] def
  2935.    /Encoding 256 array def
  2936.    0 1 255 {Encoding exch /.notdef put} for
  2937.  
  2938.    /BuildChar
  2939.      { 1  0
  2940.        -0.1 -0.1 1.1 1.1
  2941.        setcachedevice
  2942.        pop begin
  2943.  
  2944.        1 .5 moveto
  2945.        .5 .5 .5 0 360 arc
  2946.        fill
  2947.  
  2948.        end
  2949.      } def
  2950.    end
  2951.  
  2952.    /FillFont newfont definefont pop
  2953.    /FillFont findfont 2 scalefont setfont
  2954.  
  2955.    /dx Bburx Bbllx sub def
  2956.    /dy Bbury Bblly sub def
  2957.  
  2958.    eoclip
  2959.    0 setgray
  2960.    fill
  2961.  
  2962.    1 setgray
  2963.    /mtx matrix currentmatrix def
  2964.    dx dy mul Number mul 100000 div cvi
  2965.       { rand dx mod Bbllx add
  2966.       rand dy mod Bblly add
  2967.       moveto
  2968.       MaxSize rand  MaxSize MinSize div cvi  mod 1 add div 10 div
  2969.       dup scale
  2970.       (a) show
  2971.       mtx setmatrix
  2972.       } repeat
  2973.  
  2974.    } bind def
  2975.  
  2976. %@Fill
  2977. /StarShapes %FormasdeEstrelas,5, Pontos:=5, FreqⁿΩncia:=2, Espaτamento:=100, ┬ngulo:=36, Cinza:=100
  2978.    {
  2979.    /Grey exch 0 100 InRange def
  2980.    /Theta exch 1 90 InRange def
  2981.    /Spacing exch 1 300 InRange def
  2982.    /Frequency exch 1 25 InRange def
  2983.    /Points exch 1 15 InRange def
  2984.  
  2985.    /str 1 string def
  2986.    str 0 Points put
  2987.  
  2988.    /newfont 10 dict def
  2989.    newfont begin
  2990.  
  2991.    /FontMatrix [.001                0
  2992.                 0                   .001
  2993.                 0                   0] def
  2994.    /FontType 3 def
  2995.    /FontBBox [0 0 500 1000] def
  2996.  
  2997.    /Encoding 256 array def
  2998.    0 1 255 {Encoding exch /.notdef put} for
  2999.  
  3000.    /BuildChar
  3001.      {Spacing 100 div 500 mul  dup
  3002.       -0.1 -0.1 500.1 1000.1
  3003.       setcachedevice
  3004.       exch begin
  3005.  
  3006.       250 250 translate
  3007.       250 250 scale
  3008.       90 rotate
  3009.  
  3010.       dup
  3011.       180 exch div dup sin exch cos div
  3012.       Theta 2 div dup sin exch cos div
  3013.  
  3014.       1 0 moveto
  3015.       2 index
  3016.          {
  3017.          360 3 index div rotate
  3018.          dup dup 3 index add div
  3019.          dup 3 index mul neg
  3020.          lineto
  3021.          1 0 lineto
  3022.          } repeat
  3023.       closepath
  3024.  
  3025.       fill
  3026.       pop pop pop
  3027.  
  3028.       end
  3029.      }def
  3030.    end
  3031.  
  3032.    /pntsize 100000 Frequency div Spacing div def
  3033.  
  3034.    /FillFont newfont definefont pop
  3035.    /FillFont findfont pntsize scalefont setfont
  3036.  
  3037.    /increment Spacing 100 div pntsize mul def
  3038.  
  3039.    eoclip newpath
  3040.  
  3041.    Grey 100 div 1 exch sub setgray
  3042.    Bblly increment Bbury
  3043.      { Bbllx 1 index moveto
  3044.        { str show
  3045.          currentpoint
  3046.          dup 3 index sub
  3047.          increment 2.1 div gt { increment sub } if
  3048.          1 index Bburx gt
  3049.          {pop pop pop exit} if
  3050.          moveto
  3051.        } loop
  3052.      } for
  3053.    } bind def
  3054.  
  3055. %@Fill
  3056. /StoneWall %Muros,4, FreqⁿΩncia:=15, CinzaMßx:=100, CinzaMφn:=0, LarguraLinha:=5
  3057.    {
  3058.    /Linewidth exch 0 100 InRange def
  3059.    /MinGrey exch 0 100 InRange def
  3060.    /MaxGrey exch MinGrey 100 InRange def
  3061.    /Frequency exch 1 50 InRange def
  3062.  
  3063.    /DifGrey MaxGrey MinGrey sub def
  3064.    DifGrey 0 eq
  3065.       { /DifGrey 1 def
  3066.       } if
  3067.    Linewidth Frequency mul 250 div setlinewidth
  3068.    eoclip newpath
  3069.    0 srand
  3070.  
  3071.    currentscreen
  3072.    3 -1 roll
  3073.    pop 100
  3074.    3 1 roll
  3075.    setscreen
  3076.  
  3077.    /dy Bbury Bblly sub def
  3078.    /dx Bburx Bbllx sub def
  3079.    Bbllx Bbury translate
  3080.    250 Frequency div dup scale
  3081.  
  3082.    dy 920 div Frequency mul cvi {
  3083.       0 0 moveto
  3084.       /x0 0 def
  3085.       /y0 0 def
  3086.       /x1 0 def
  3087.       /y1 0 def
  3088.       /x2 0 def
  3089.       /y2 0 def
  3090.       /x3 0 def
  3091.       /y3 0 def
  3092.       0 5 dx 200 div Frequency mul
  3093.          { rand 50 mod 25 div 1 sub add
  3094.          x3 y3 moveto
  3095.          x2 y2 x1 y1 x0 y0 curveto
  3096.          dup rand 30 mod 15 div neg 2 sub
  3097.          2 copy
  3098.          /y0 exch def
  3099.          /x0 exch def
  3100.          lineto
  3101.          dup rand 50 mod 10 div 2.5 sub add rand 50 mod 10 div neg
  3102.          1 index rand 50 mod 10 div
  3103.          4 index rand 30 mod 15 div 2 add
  3104.          6 copy
  3105.          /y3 exch def
  3106.          /x3 exch def
  3107.          /y2 exch def
  3108.          /x2 exch def
  3109.          /y1 exch def
  3110.          /x1 exch def
  3111.          curveto
  3112.          pop
  3113.          closepath
  3114.          gsave
  3115.          rand DifGrey mod MinGrey add 100 div 1 exch sub setgray fill
  3116.          grestore
  3117.          0 setgray stroke
  3118.          } for
  3119.       0 -4 translate
  3120.       } repeat
  3121.    } bind def
  3122.  
  3123. %@Fill
  3124. /Text %Texto,5, Fonte:=1, Caractere:=67, FreqⁿΩncia:=4, Espaτamento:=100, FundoCinza:=0
  3125.    {
  3126.    /BackGrey exch -1 100 InRange def
  3127.    /Spacing exch 30 300 InRange def
  3128.    /Frequency exch 1 50 InRange def
  3129.    /Character exch 33 255 InRange def
  3130.    /Font exch 1 35 InRange def
  3131.  
  3132.    /pntsize 100000 Frequency div Spacing div def
  3133.    Font  1 eq { /Times-Roman } if
  3134.    Font  2 eq { /Times-Italic } if
  3135.    Font  3 eq { /Times-Bold } if
  3136.    Font  4 eq { /Times-BoldItalic } if
  3137.    Font  5 eq { /Helvetica } if
  3138.    Font  6 eq { /Helvetica-Oblique } if
  3139.    Font  7 eq { /Helvetica-Bold } if
  3140.    Font  8 eq { /Helvetica-BoldOblique } if
  3141.    Font  9 eq { /Courier } if
  3142.    Font 10 eq { /Courier-Oblique } if
  3143.    Font 11 eq { /Courier-Bold } if
  3144.    Font 12 eq { /Courier-BoldOblique } if
  3145.    Font 13 eq { /Symbol } if
  3146.    Font 14 eq { /AvantGarde-Book } if
  3147.    Font 15 eq { /AvantGarde-BookOblique } if
  3148.    Font 16 eq { /AvantGarde-Demi } if
  3149.    Font 17 eq { /AvantGarde-DemiOblique } if
  3150.    Font 18 eq { /Bookman-Demi } if
  3151.    Font 19 eq { /Bookman-DemiItalic } if
  3152.    Font 20 eq { /Bookman-Light } if
  3153.    Font 21 eq { /Bookman-LightItalic } if
  3154.    Font 22 eq { /Helvetica-Narrow } if
  3155.    Font 23 eq { /Helvetica-Narrow-Bold } if
  3156.    Font 24 eq { /Helvetica-Narrow-BoldOblique } if
  3157.    Font 25 eq { /Helvetica-Narrow-Oblique } if
  3158.    Font 26 eq { /NewCenturySchlbk-Roman } if
  3159.    Font 27 eq { /NewCenturySchlbk-Bold } if
  3160.    Font 28 eq { /NewCenturySchlbk-Italic } if
  3161.    Font 29 eq { /NewCenturySchlbk-BoldItalic } if
  3162.    Font 30 eq { /Palatino-Roman } if
  3163.    Font 31 eq { /Palatino-Bold } if
  3164.    Font 32 eq { /Palatino-Italic } if
  3165.    Font 33 eq { /Palatino-BoldItalic } if
  3166.    Font 34 eq { /ZapfChancery-MediumItalic } if
  3167.    Font 35 eq { /ZapfDingbats } if
  3168.    findfont pntsize scalefont setfont
  3169.  
  3170.    /str 1 string def
  3171.    str 0 Character put
  3172.  
  3173.    /increment Spacing 100 div pntsize mul 2 mul def
  3174.  
  3175.    eoclip
  3176.    BackGrey 0 ge
  3177.       { BackGrey 100 div 1 exch sub setgray fill }
  3178.       { newpath } ifelse
  3179.  
  3180.    /Bbury Bbury pntsize add def
  3181.  
  3182.    0 setgray
  3183.    Bblly increment Bbury
  3184.      { Bbllx 1 index moveto
  3185.        { str show
  3186.          currentpoint increment 2 div add
  3187.          dup 3 index sub
  3188.          increment 2.1 div gt { increment sub } if
  3189.          1 index Bburx gt
  3190.          {pop pop pop exit} if
  3191.          moveto
  3192.        } loop
  3193.      } for
  3194.    } bind def
  3195.  
  3196. %@Fill
  3197. /Tiles %Ladrilhos,4, FreqⁿΩncia:=8, LarguraLinha:=5, PrimeiroPlanoCinza:=100, FundoCinza:=0
  3198.    {
  3199.    /BackgroundGray exch -1 100 InRange def
  3200.    /ForegroundGray exch 0 100 InRange def
  3201.    /Linewidth      exch 0 100 InRange def
  3202.    /Frequency      exch 2 100 InRange def
  3203.  
  3204.    /newfont 10 dict def
  3205.    newfont begin
  3206.  
  3207.    /FontMatrix [1  0  0
  3208.                 1  0  0] def
  3209.    /FontType 3 def
  3210.    /FontBBox [0 0 2 1] def
  3211.    /Encoding 256 array def
  3212.    0 1 255 {Encoding exch /.notdef put} for
  3213.  
  3214.    /BuildChar
  3215.      { 2  .5
  3216.        -0.1 -0.1 2.1 1.1
  3217.        setcachedevice
  3218.        pop begin
  3219.  
  3220.        0   0 moveto
  3221.        1.5 0 lineto
  3222.        1.75  0 .25 180 90 arcn
  3223.        1.75 .5 .25 -90 90 arc
  3224.        1.75  1 .25 270 180 arcn
  3225.        0   1 lineto
  3226.  
  3227.        Linewidth pntsize div setlinewidth
  3228.        stroke
  3229.  
  3230.        end
  3231.      } def
  3232.    end
  3233.  
  3234.    /pntsize 500 Frequency div def
  3235.  
  3236.    /FillFont newfont definefont pop
  3237.    /FillFont findfont pntsize scalefont setfont
  3238.  
  3239.    eoclip
  3240.    BackgroundGray 0 ge
  3241.       { BackgroundGray 100 div 1 exch sub setgray fill }
  3242.       { newpath } ifelse
  3243.  
  3244.    ForegroundGray 100 div 1 exch sub setgray
  3245.  
  3246.    Bblly pntsize Bbury
  3247.      { Bbllx 1 index moveto
  3248.        { (a) show
  3249.          currentpoint
  3250.          dup 3 index sub
  3251.          pntsize 2.1 div gt { pntsize sub } if
  3252.          1 index Bburx gt
  3253.          {pop pop pop exit} if
  3254.          moveto
  3255.        } loop
  3256.      } for
  3257.    } bind def
  3258.  
  3259. %@Fill
  3260. /TreeRings %AnΘis,5, DistMßx:=150, DistMφn:=0, LarguraLinha:=5, FundoCinza:=0, InφcioAleat≤rio:=0
  3261.    { srand
  3262.    /BackGrey exch -1 100 InRange def
  3263.    /LineWidth exch 0 100 InRange def
  3264.    /MinDist exch 0 500 InRange def
  3265.    /MaxDist exch MinDist 500 InRange MinDist wDstChck def
  3266.  
  3267.    eoclip
  3268.    BackGrey 0 ge
  3269.       { BackGrey 100 div 1 exch sub setgray fill }
  3270.       { newpath } ifelse
  3271.  
  3272.    /cx Bburx Bbllx add 2 div def
  3273.    /cy Bbury Bblly add 2 div def
  3274.    /pntsize MaxDist MinDist sub def
  3275.    /hyp Bburx Bbllx sub dup mul Bbury Bblly sub dup mul add sqrt def
  3276.  
  3277.    /wr 0 def
  3278.    0 setgray
  3279.    LineWidth setlinewidth
  3280.  
  3281.       {
  3282.       /wr rand pntsize mod MinDist add wr add def
  3283.       cx wr add  cy moveto
  3284.       cx cy wr 0 360 arc
  3285.       stroke
  3286.       wr hyp gt {exit} if
  3287.       } loop
  3288.    } bind def
  3289.  
  3290. %@Fill
  3291. /Triangle %TriΓngulo,4, FreqⁿΩncia:=8, LarfuraLinha:=5, PrimeiroPlanoCinza:=100, FundoCinza:=0
  3292.    {
  3293.    /BackgroundGray exch -1 100 InRange def
  3294.    /ForegroundGray exch 0 100 InRange def
  3295.    /Linewidth      exch 0 100 InRange def
  3296.    /Frequency      exch 2 100 InRange def
  3297.  
  3298.    /newfont 10 dict def
  3299.    newfont begin
  3300.  
  3301.    /FontMatrix  [ 0.5773  0
  3302.                   0             0.5773
  3303.                   0             0] def
  3304.    /FontType 3 def
  3305.    /FontBBox [0 0 1 3 sqrt] def
  3306.    /Encoding 256 array def
  3307.    0 1 255 {Encoding exch /.notdef put} for
  3308.  
  3309.    /BuildChar
  3310.      { 1  0
  3311.        -0.1  -0.1  1.1  1.8320
  3312.        setcachedevice
  3313.        pop begin
  3314.  
  3315.        0 0 moveto
  3316.        1 1.7320 lineto
  3317.        0 1.7320 lineto
  3318.        1 0 lineto
  3319.        closepath
  3320.  
  3321.        0 0.8660 moveto
  3322.        1 0.8660 lineto
  3323.  
  3324.        Linewidth pntsize div 1.7320 mul setlinewidth
  3325.        stroke
  3326.  
  3327.       end
  3328.      } def
  3329.    end
  3330.  
  3331.    /pntsize 1732 Frequency div def
  3332.    /FillFont newfont definefont pop
  3333.    /FillFont findfont pntsize scalefont setfont
  3334.  
  3335.    eoclip
  3336.    BackgroundGray 0 ge
  3337.       { BackgroundGray 100 div 1 exch sub setgray fill }
  3338.       { newpath } ifelse
  3339.  
  3340.    ForegroundGray 100 div 1 exch sub setgray
  3341.  
  3342.    Bblly pntsize Bbury
  3343.      { Bbllx pntsize sub pntsize 3 sqrt div Bburx
  3344.        { 1 index moveto
  3345.        (a) show
  3346.        } for
  3347.      pop
  3348.      } for
  3349.    } bind def
  3350.  
  3351. %@Fill
  3352. /Waves %Ondas,5, FreqⁿΩncia:=6, LarguraLinha:=5, PrimeiroPlanoCinza:=100, FundoCinza:=0, Espaτamento(%):=100
  3353.    {
  3354.    /Spacing        exch 30 300 InRange def
  3355.    /BackgroundGray exch -1 100 InRange def
  3356.    /ForegroundGray exch 0 100 InRange def
  3357.    /Linewidth      exch  0 100 InRange def
  3358.    /Frequency      exch  2 100 InRange def
  3359.  
  3360.    /newfont 10 dict def
  3361.    newfont begin
  3362.  
  3363.    /FontMatrix [0.0119  0
  3364.                 0          0.0119
  3365.                 0          0] def
  3366.    /FontType 3 def
  3367.    /FontBBox [37 56 111 114] def
  3368.    /Encoding 256 array def
  3369.    0 1 255 {Encoding exch /.notdef put} for
  3370.  
  3371.    /BuildChar
  3372.      { 74  0
  3373.        36.9 55.9 111.1 114.1
  3374.        setcachedevice
  3375.        pop begin
  3376.  
  3377.        1 1.5 scale
  3378.  
  3379.        37 38 moveto
  3380.        76 38 79 73 111 57 curveto
  3381.        80 60 80 38 111 38 curveto
  3382.  
  3383.        Linewidth pntsize div 84 mul setlinewidth
  3384.        stroke
  3385.  
  3386.       end
  3387.      } def
  3388.    end
  3389.  
  3390.    /pntsize 783 Frequency div def
  3391.  
  3392.    /FillFont newfont definefont pop
  3393.    /FillFont findfont pntsize scalefont setfont
  3394.  
  3395.    /Height pntsize Spacing 100 div mul def
  3396.  
  3397.    /Bbllx Bbllx Height sub def
  3398.    /Bblly Bblly Height sub def
  3399.    /Bburx Bburx Height add def
  3400.    /Bbury Bbury Height add def
  3401.  
  3402.    eoclip
  3403.    BackgroundGray 0 ge
  3404.       { BackgroundGray 100 div 1 exch sub setgray fill }
  3405.       { newpath } ifelse
  3406.  
  3407.    ForegroundGray 100 div 1 exch sub setgray
  3408.    Bblly Height Bbury
  3409.      { Bbllx exch moveto
  3410.        { (a) show
  3411.          currentpoint
  3412.          pop Bburx gt
  3413.          {exit} if
  3414.        } loop
  3415.      } for
  3416.    } bind def
  3417.  
  3418. %------ Color PostScript fills added for v6.0 
  3419.  
  3420. %@Fill
  3421. /ColorBubbles %BolhasColoridas,5, N·mero (pol▓):=25, TamanhoMßx:=300, TamanhoMφn:=10, LarguraLinha:=10, InφcioAleat≤rio:=0
  3422.    { srand
  3423.    /LineWidth exch 0 50 InRange def
  3424.    /MinSize exch 1 1000 InRange def
  3425.    /MaxSize exch MinSize 1000 InRange def
  3426.    /Number exch 1 250 InRange def
  3427.  
  3428.          /SetRandomRGB
  3429.          {
  3430.             3    %put 3 random numbers between 0 and 1 on the stack
  3431.             {rand 100 mod 1 add 100 div 1 exch sub}
  3432.             repeat
  3433.              setrgbcolor
  3434.          } def
  3435.  
  3436.    eoclip
  3437.    newpath
  3438.    /pntsize MaxSize MinSize div cvi def
  3439.    /dx Bburx Bbllx sub def
  3440.    /dy Bbury Bblly sub def
  3441.  
  3442.    dx dy mul Number mul 1000000 div cvi
  3443.    {  rand dx mod Bbllx add
  3444.       rand dy mod Bblly add
  3445.       rand pntsize mod 1 add pntsize exch div MinSize mul
  3446.       3 copy
  3447.       2 index add
  3448.       exch
  3449.       moveto
  3450.       pop
  3451.       0 360 arc
  3452.       gsave
  3453.  
  3454.       SetRandomRGB
  3455.  
  3456.       LineWidth setlinewidth
  3457.       stroke
  3458.       grestore
  3459.  
  3460.       1 setgray
  3461.       fill
  3462.       } repeat
  3463.  
  3464.    } bind def
  3465.  
  3466. %@Fill
  3467. /ColorCircles %CφrculosColoridos,4, N·mero (pol▓):=25, TamanhoMßx:=300, TamanhoMφn:=10, InφcioAleat≤rio:=0
  3468.    { srand
  3469.    /MinSize exch 1 1000 InRange def
  3470.    /MaxSize exch MinSize 1000 InRange def
  3471.    /Number exch 1 250 InRange def
  3472.  
  3473.          /SetRandomRGB
  3474.          {
  3475.             3    %put 3 random numbers between 0 and 1 on the stack
  3476.             {rand 100 mod 1 add 100 div 1 exch sub}
  3477.             repeat
  3478.              setrgbcolor
  3479.          } def
  3480.  
  3481.    eoclip
  3482.    newpath
  3483.    /pntsize MaxSize MinSize div cvi def
  3484.    /dx Bburx Bbllx sub def
  3485.    /dy Bbury Bblly sub def
  3486.  
  3487.    dx dy mul Number mul 1000000 div cvi
  3488.    {  rand dx mod Bbllx add
  3489.       rand dy mod Bblly add
  3490.       rand pntsize mod 1 add pntsize exch div MinSize mul
  3491.       3 copy
  3492.       2 index add
  3493.       exch
  3494.       moveto
  3495.       pop
  3496.       0 360 arc
  3497.       
  3498.       SetRandomRGB
  3499.  
  3500.       fill
  3501.  
  3502.         } repeat
  3503.  
  3504.    } bind def
  3505.  
  3506. %@Fill
  3507. /ColorCrosshatching %XadrezColoridos,5, DistMßx:=75, DistMφn:=0, LarguraLinha:=5, ┬ngulo:=45, InφcioAleat≤rio:=0
  3508.    { srand
  3509.    /Angle exch -180 180 InRange def
  3510.    /LineWidth exch 0 100 InRange def
  3511.    /MinDist exch 0 500 InRange def
  3512.    /MaxDist exch MinDist 500 InRange MinDist wDstChck def
  3513.  
  3514.          /SetRandomRGB
  3515.          {
  3516.             3    %put 3 random numbers between 0 and 1 on the stack
  3517.             {rand 100 mod 1 add 100 div 1 exch sub}
  3518.             repeat
  3519.              setrgbcolor
  3520.          } def
  3521.  
  3522.    eoclip
  3523.    newpath
  3524.  
  3525.    /pntsize MaxDist MinDist sub def
  3526.    /dx2 Bburx Bbllx sub 2 div def
  3527.    /dy2 Bbury Bblly sub 2 div def
  3528.    /hyp2 dx2 dup mul dy2 dup mul add sqrt def
  3529.  
  3530.    Bbllx Bblly translate
  3531.    dx2 dy2 translate
  3532.    Angle rotate
  3533.    LineWidth setlinewidth
  3534.  
  3535.    /wd hyp2 neg def
  3536.       { /wd rand pntsize mod MinDist add wd add def
  3537.       wd hyp2 neg moveto
  3538.       wd hyp2 lineto
  3539.  
  3540.             SetRandomRGB
  3541.             stroke
  3542.  
  3543.       wd hyp2 gt {exit} if
  3544.       } loop
  3545.  
  3546.    Angle -2 mul rotate
  3547.    /wd hyp2 neg def
  3548.       { /wd rand pntsize mod MinDist add wd add def
  3549.       wd hyp2 neg moveto
  3550.       wd hyp2 lineto
  3551.  
  3552.             SetRandomRGB
  3553.             stroke
  3554.  
  3555.       wd hyp2 gt {exit} if
  3556.       } loop
  3557.  
  3558.    } bind def
  3559.  
  3560. %@Fill
  3561. /ColorFishscale %EscamasColoridas,3, FreqⁿΩncia:=8, LarguraLinha:=5, FundoCinza:=0
  3562.    {
  3563.    /BackgroundGray exch -1 100 InRange def
  3564.    /Linewidth      exch 0 100 InRange def
  3565.    /Frequency      exch 2 100 InRange def
  3566.  
  3567.          /SetRandomRGB
  3568.          {
  3569.             3    %put 3 random numbers between 0 and 1 on the stack
  3570.             {rand 100 mod 1 add 100 div 1 exch sub}
  3571.             repeat
  3572.              setrgbcolor
  3573.          } def
  3574.  
  3575.    /newfont 10 dict def
  3576.    newfont begin
  3577.  
  3578.    /FontMatrix [1  0  0
  3579.                 1  0  0] def
  3580.    /FontType 3 def
  3581.    /FontBBox [0 0 1 1] def
  3582.    /Encoding 256 array def
  3583.    0 1 255 {Encoding exch /.notdef put} for
  3584.  
  3585.    /BuildChar
  3586.      { 1  0
  3587.        0 0 1 1
  3588.        setcachedevice
  3589.        pop begin
  3590.  
  3591.        0.5 0.5 0.5 360 180 arcn
  3592.        0 1 0.5 270 360 arc
  3593.        1 1 0.5 180 270 arc
  3594.  
  3595.        Linewidth pntsize div setlinewidth
  3596.        stroke
  3597.  
  3598.       end
  3599.      } def
  3600.    end
  3601.  
  3602.    /pntsize 1000 Frequency div def
  3603.    /FillFont newfont definefont pop
  3604.    /FillFont findfont pntsize scalefont setfont
  3605.  
  3606.    eoclip
  3607.    BackgroundGray 0 ge
  3608.       { BackgroundGray 100 div 1 exch sub setgray fill }
  3609.       { newpath } ifelse
  3610.  
  3611.     Bblly pntsize Bbury
  3612.       { Bbllx exch moveto
  3613.         {
  3614.                   SetRandomRGB
  3615.                     
  3616.                     (a) show
  3617.           currentpoint
  3618.           pop Bburx gt
  3619.           {exit} if
  3620.         } loop
  3621.       } for
  3622.     } bind def
  3623.  
  3624. %@Fill
  3625. /GreenGrass %GramaVerde,5, N·mero:=100, TamanhoMßx:=35, TamanhoMφn:=7, Cinza:=0, InφcioAleat≤rio:=0
  3626.     { srand
  3627.     /Grey exch -1 100 InRange def
  3628.     /MinSize exch 1 100 InRange def
  3629.     /MaxSize exch MinSize 100 InRange MinSize wDstChck def
  3630.     /Number exch 1 500 InRange def
  3631.  
  3632.     eoclip
  3633.     Grey 0 ge
  3634.        { Grey 100 div 1 exch sub setgray fill }
  3635.        { newpath } ifelse
  3636.  
  3637.     /Bbllx Bbllx MaxSize sub def
  3638.     /Bblly Bblly MaxSize sub def
  3639.  
  3640.     /dx Bburx Bbllx sub def
  3641.     /dy Bbury Bblly sub def
  3642.     /dSize MaxSize MinSize sub def
  3643.  
  3644.     dx dy mul 1000000 div Number mul cvi
  3645.        {
  3646.  
  3647.        matrix currentmatrix
  3648.  
  3649.        rand dx mod Bbllx add
  3650.        rand dy mod Bblly add
  3651.        translate
  3652.  
  3653.        rand dSize mod MinSize add
  3654.        dup scale
  3655.  
  3656.        -0.5 0 moveto
  3657.        rand 14 mod 7 sub
  3658.        -0.5 3  2 index 3 div 0.3 sub 10  4 index 10 curveto
  3659.        3 div 0.3 add 10 0.5 3 0.5 0 curveto
  3660.              closepath
  3661.  
  3662.        gsave
  3663.              0                                                                            %0 red
  3664.              rand 100 mod 1 add 100 div 1 exch sub    %random green
  3665.              dup 0.7 lt {pop 0.7} if                                 %above .7
  3666.              0                                                                            %0 blue
  3667.               setrgbcolor
  3668.        fill
  3669.        grestore
  3670.  
  3671.        0.1 setlinewidth
  3672.        0 setgray
  3673.        stroke
  3674.  
  3675.        setmatrix
  3676.  
  3677.        } repeat
  3678.  
  3679.      } bind def
  3680.  
  3681. %@Fill
  3682. /ColorHatching %LinhasColoridas,5, DistMßx:=75, DistMφn:=0, LarguraLinha:=5, ┬ngulo:=45, InφcioAleat≤rio:=0
  3683.    { srand
  3684.    /Angle exch -180 180 InRange def
  3685.    /LineWidth exch 0 100 InRange def
  3686.    /MinDist exch 0 500 InRange def
  3687.    /MaxDist exch MinDist 500 InRange MinDist wDstChck def
  3688.  
  3689.      /SetRandomRGB
  3690.      {
  3691.          3    %put 3 random numbers between 0 and 1 on the stack
  3692.          {rand 100 mod 1 add 100 div 1 exch sub}
  3693.          repeat
  3694.          setrgbcolor
  3695.      } def
  3696.  
  3697.    eoclip
  3698.    newpath
  3699.  
  3700.    /pntsize MaxDist MinDist sub def
  3701.    /dx2 Bburx Bbllx sub 2 div def
  3702.    /dy2 Bbury Bblly sub 2 div def
  3703.    /hyp2 dx2 dup mul dy2 dup mul add sqrt def
  3704.  
  3705.    Bbllx Bblly translate
  3706.    dx2 dy2 translate
  3707.    Angle rotate
  3708.    LineWidth setlinewidth
  3709.  
  3710.    /wd hyp2 neg def
  3711.  
  3712.       { /wd rand pntsize mod MinDist add wd add def
  3713.       wd hyp2 neg moveto
  3714.       wd hyp2 lineto
  3715.  
  3716.             SetRandomRGB
  3717.  
  3718.       stroke
  3719.       wd hyp2 gt {exit} if
  3720.       } loop
  3721.  
  3722.    } bind def
  3723.  
  3724. %@Fill
  3725. /GreenLeaves %FolhasVerdes,5, N·mero (pol▓):=50, VerdeMßx:=100, VerdeMφn:=70, TamanhoMßx:=100, TamanhoMφn:=10
  3726.    {
  3727.    /MinSize exch 1 200 InRange def
  3728.    /MaxSize exch MinSize 200 InRange MinSize wDstChck def
  3729.    /MinGreen exch 0 100 InRange def
  3730.    /MaxGreen exch MinGreen 100 InRange def
  3731.    /Number exch 1 250 InRange def
  3732.  
  3733.    eoclip newpath
  3734.    currentscreen
  3735.    3 -1 roll
  3736.    pop 90
  3737.    3 1 roll
  3738.    setscreen
  3739.  
  3740.    /dx Bburx Bbllx sub def
  3741.    /dy Bbury Bblly sub def
  3742.  
  3743.    dx dy mul Number mul 1000000 div cvi
  3744.       {
  3745.       matrix currentmatrix
  3746.  
  3747.       rand dx mod Bbllx add
  3748.       rand dy mod Bblly add
  3749.       translate
  3750.  
  3751.       rand 360 mod
  3752.       rotate
  3753.  
  3754.       MaxSize MinSize eq
  3755.         { Maxsize 10.8 div }
  3756.         { rand MaxSize MinSize sub mod MinSize add 10.8 div } ifelse
  3757.       dup scale
  3758.  
  3759.       17 0 moveto
  3760.       65 -18 106 -13 125 0 curveto
  3761.       106 13  65  18  17 0 curveto
  3762.       gsave
  3763.             0    % 0 red
  3764.       MaxGreen MinGreen eq
  3765.         { MaxGreen 100 div }
  3766.         { rand MaxGreen MinGreen sub mod MinGreen add 100 div } ifelse
  3767.             0 % 0 blue
  3768.       setrgbcolor
  3769.       fill
  3770.       grestore
  3771.       0.3 setlinewidth
  3772.       0 setgray
  3773.       stroke
  3774.  
  3775.       setmatrix
  3776.  
  3777.       } repeat
  3778.  
  3779.    } bind def
  3780.  
  3781. %@Fill
  3782. /ColorLeaves %FolhasColoridas,3, N·mero (pol▓):=50, TamanhoMßx:=100, TamanhoMφn:=10
  3783.    {
  3784.    /MinSize exch 1 200 InRange def
  3785.    /MaxSize exch MinSize 200 InRange MinSize wDstChck def
  3786.    /Number exch 1 250 InRange def
  3787.  
  3788.          /SetRandomRGB
  3789.          {
  3790.             3    %put 3 random numbers between 0 and 1 on the stack
  3791.             {rand 100 mod 1 add 100 div 1 exch sub}
  3792.             repeat
  3793.              setrgbcolor
  3794.          } def
  3795.  
  3796.    eoclip newpath
  3797.    currentscreen
  3798.    3 -1 roll
  3799.    pop 90
  3800.    3 1 roll
  3801.    setscreen
  3802.  
  3803.    /dx Bburx Bbllx sub def
  3804.    /dy Bbury Bblly sub def
  3805.  
  3806.    dx dy mul Number mul 1000000 div cvi
  3807.       {
  3808.       matrix currentmatrix
  3809.  
  3810.       rand dx mod Bbllx add
  3811.       rand dy mod Bblly add
  3812.       translate
  3813.  
  3814.       rand 360 mod
  3815.       rotate
  3816.  
  3817.       MaxSize MinSize eq
  3818.         { Maxsize 10.8 div }
  3819.         { rand MaxSize MinSize sub mod MinSize add 10.8 div } ifelse
  3820.       dup scale
  3821.  
  3822.       17 0 moveto
  3823.       65 -18 106 -13 125 0 curveto
  3824.       106 13  65  18  17 0 curveto
  3825.       gsave
  3826.  
  3827.       SetRandomRGB
  3828.  
  3829.       fill
  3830.       grestore
  3831.       0.3 setlinewidth
  3832.       0 setgray
  3833.       stroke
  3834.  
  3835.       setmatrix
  3836.  
  3837.       } repeat
  3838.  
  3839.    } bind def
  3840.  
  3841. %@Fill
  3842. /ColorReptiles %RΘpteisColoridos,2, FreqⁿΩncia:=4, LarguraLinha:=8
  3843. {
  3844.   /LineWidth exch 0 250 InRange def
  3845.   /Frequency exch 1 100 InRange def
  3846.  
  3847.     /SetRandomRGB
  3848.     {
  3849.         3    %put 3 random numbers between 0 and 1 on the stack
  3850.         {rand 100 mod 1 add 100 div 1 exch sub}
  3851.         repeat
  3852.         setrgbcolor
  3853.     } def
  3854.  
  3855.   /newfont 10 dict def
  3856.   newfont begin
  3857.  
  3858.   /FontMatrix [0.2857            0
  3859.                0                   0.2857
  3860.                0                   0] def
  3861.   /FontType 3 def
  3862.   /FontBBox [-1.73 -1.86 2.36 2.0] def
  3863.   /Encoding 256 array def
  3864.   0 1 255 {Encoding exch /.notdef put} for
  3865.   Encoding 97 /ReptilesStroked put
  3866.   Encoding 98 /ReptileFilled put
  3867.  
  3868.   /CharProcs 3 dict def
  3869.   CharProcs begin
  3870.   /.notdef {} def
  3871.   /ReptilesStroked
  3872.   {
  3873.     %3 sqrt  1.5  translate
  3874.  
  3875.     0.8660  0.5  moveto
  3876.     3
  3877.     {
  3878.       120 rotate
  3879.  
  3880.       0     0    moveto
  3881.       0.32 -0.40 lineto
  3882.       0.32 -0.48 lineto
  3883.       0    -0.72 lineto
  3884.  
  3885.       0.05 -1.03 moveto
  3886.       0.4  -0.76 lineto
  3887.       0.84 -0.84 lineto
  3888.       0.5  -0.96 lineto
  3889.       0.31 -1.18 lineto
  3890.  
  3891.       0.87 -1.5  moveto
  3892.       0.58 -1.28 lineto
  3893.       0.8  -1.14 lineto
  3894.       0.94 -1.18 lineto
  3895.       1.24 -1.08 lineto
  3896.       1.42 -1.18 lineto
  3897.  
  3898.       1.68 -1.02 moveto
  3899.       1.52 -0.84 lineto
  3900.       1.64 -0.66 lineto
  3901.       1.73 -0.36 lineto
  3902.  
  3903.       1.73  0    moveto
  3904.       1.41 -0.26 lineto
  3905.       1.32 -0.49 lineto
  3906.       1.06 -0.24 lineto
  3907.       1.42  0.18 lineto
  3908.  
  3909.       0.87  0.57 moveto
  3910.       0.87  0.26 lineto
  3911.       0.99  0.26 lineto
  3912.       1.05  0.12 lineto
  3913.       0.82 -0.07 lineto
  3914.       0.68 -0.07 lineto
  3915.       0.62  0.36 lineto
  3916.  
  3917.  
  3918.       0.8660  0.5 moveto
  3919.  
  3920.     } repeat
  3921.  
  3922.     LineWidth Pointsize div 3.5 mul setlinewidth
  3923.     stroke
  3924.  
  3925.   } def
  3926.   /ReptileFilled
  3927.   {
  3928.     0     0    moveto
  3929.     0.32 -0.40 lineto
  3930.     0.32 -0.48 lineto
  3931.     0    -0.72 lineto
  3932.  
  3933.    -0.40 -0.55 lineto
  3934.    -0.47 -0.68 lineto
  3935.    -0.42 -0.97 lineto
  3936.    -0.27 -0.99 lineto
  3937.    -0.21 -0.88 lineto
  3938.  
  3939.     0.05 -1.03 lineto
  3940.     0.4  -0.76 lineto
  3941.     0.84 -0.84 lineto
  3942.     0.5  -0.96 lineto
  3943.     0.31 -1.18 lineto
  3944.  
  3945.     0.32 -1.39 lineto
  3946.     0.55 -1.60 lineto
  3947.     0.59 -1.74 lineto
  3948.     0.82 -1.86 lineto
  3949.  
  3950.     0.87 -1.5  lineto
  3951.     0.58 -1.28 lineto
  3952.     0.8  -1.14 lineto
  3953.     0.94 -1.18 lineto
  3954.     1.24 -1.08 lineto
  3955.     1.42 -1.18 lineto
  3956.     1.52 -1.45 lineto
  3957.     1.45 -1.81 lineto
  3958.     1.74 -1.47 lineto
  3959.     1.68 -1.02 lineto
  3960.     1.52 -0.84 lineto
  3961.     1.64 -0.66 lineto
  3962.     1.73 -0.36 lineto
  3963.     2.28 -0.46 lineto
  3964.     2.36 -0.11 lineto
  3965.     2.12 -0.15 lineto
  3966.     1.73  0    lineto
  3967.     1.41 -0.26 lineto
  3968.     1.32 -0.49 lineto
  3969.     1.06 -0.24 lineto
  3970.     1.42  0.18 lineto
  3971.     1.21  0.41 lineto
  3972.     1.11  0.60 lineto
  3973.  
  3974.     0.87  0.57 lineto
  3975.     0.87  0.26 lineto
  3976.     0.99  0.26 lineto
  3977.     1.05  0.12 lineto
  3978.     0.82 -0.07 lineto
  3979.     0.68 -0.07 lineto
  3980.     0.62  0.36 lineto
  3981.     0.26  0.52 lineto
  3982.     0.19  0.48 lineto
  3983.     closepath
  3984.     fill
  3985.   } def
  3986.   end
  3987.  
  3988.   /BuildChar
  3989.   {
  3990.     2.5980  1.5
  3991.     -1.83 -1.96 2.46 2.1
  3992.     setcachedevice
  3993.     exch begin
  3994.     Encoding exch get
  3995.     CharProcs exch get
  3996.     end
  3997.     exec
  3998.   } def
  3999.   end
  4000.  
  4001.   /Pointsize 2000 Frequency div def
  4002.  
  4003.   /FillFont newfont definefont pop
  4004.   /FillFont findfont Pointsize scalefont setfont
  4005.  
  4006.   /pntsize Pointsize 6 mul 7 div def
  4007.   /HeightDiff Pointsize 2 mul 7 div .49 mul def
  4008.  
  4009.   eoclip newpath
  4010.  
  4011.   currentscreen
  4012.   3 -1 roll
  4013.   pop 120
  4014.   3 1 roll
  4015.   setscreen
  4016.  
  4017.   Bblly pntsize Bbury pntsize add HeightDiff add
  4018.   {
  4019.     Bbllx 1 index moveto
  4020.     {
  4021.       currentpoint
  4022.       1 index exch
  4023.  
  4024.       2 copy 2 copy translate
  4025.       240 rotate
  4026.       
  4027.             SetRandomRGB
  4028.             (b) show
  4029.  
  4030.       0 0 moveto
  4031.       -240 rotate
  4032.       neg exch neg exch translate
  4033.  
  4034.       2 copy translate
  4035.       120 rotate
  4036.       
  4037.             SetRandomRGB
  4038.             (b) show
  4039.       
  4040.             0 0 moveto
  4041.       -120 rotate
  4042.       neg exch neg exch translate
  4043.  
  4044.             SetRandomRGB
  4045.       (b) show
  4046.  
  4047.       currentpoint
  4048.       dup 4 index sub
  4049.       pntsize 2.1 div gt { pntsize sub } if
  4050.       3 -1 roll Bburx gt
  4051.       {pop pop pop exit} if
  4052.       moveto
  4053.     } loop
  4054.   } for
  4055.  
  4056.   LineWidth 0 gt
  4057.   {
  4058.     0 setgray
  4059.     Bblly pntsize Bbury pntsize add
  4060.     {
  4061.       Bbllx 1 index moveto
  4062.       {
  4063.         (a) show
  4064.         currentpoint
  4065.         dup 3 index sub
  4066.         pntsize 2.1 div gt { pntsize sub } if
  4067.         1 index Bburx gt
  4068.         {pop pop pop exit} if
  4069.         moveto
  4070.       } loop
  4071.     } for
  4072.   } if
  4073. } bind def
  4074.  
  4075. %@Fill
  4076. /StainedGlass %VidroColorido,2, FreqⁿΩncia:=15, LarguraLinha:=5
  4077.    {
  4078.    /Linewidth exch 0 100 InRange def
  4079.    /Frequency exch 1 50 InRange def
  4080.  
  4081.      /SetRandomRGB
  4082.      {
  4083.          3    %put 3 randoms number between 0 and 1 on the stack
  4084.          {rand 100 mod 1 add 100 div 1 exch sub}
  4085.          repeat
  4086.         setrgbcolor
  4087.      } def
  4088.  
  4089.    Linewidth Frequency mul 250 div setlinewidth
  4090.    eoclip newpath
  4091.    0 srand
  4092.  
  4093.    currentscreen
  4094.    3 -1 roll
  4095.    pop 100
  4096.    3 1 roll
  4097.    setscreen
  4098.  
  4099.    /dy Bbury Bblly sub def
  4100.    /dx Bburx Bbllx sub def
  4101.    Bbllx Bbury translate
  4102.    250 Frequency div dup scale
  4103.  
  4104.    dy 920 div Frequency mul cvi {
  4105.       0 0 moveto
  4106.       /x0 0 def
  4107.       /y0 0 def
  4108.       /x1 0 def
  4109.       /y1 0 def
  4110.       /x2 0 def
  4111.       /y2 0 def
  4112.       /x3 0 def
  4113.       /y3 0 def
  4114.       0 5 dx 200 div Frequency mul
  4115.          { rand 50 mod 25 div 1 sub add
  4116.          x3 y3 moveto
  4117.          x2 y2 x1 y1 x0 y0 curveto
  4118.          dup rand 30 mod 15 div neg 2 sub
  4119.          2 copy
  4120.          /y0 exch def
  4121.          /x0 exch def
  4122.          lineto
  4123.          dup rand 50 mod 10 div 2.5 sub add rand 50 mod 10 div neg
  4124.          1 index rand 50 mod 10 div
  4125.          4 index rand 30 mod 15 div 2 add
  4126.          6 copy
  4127.          /y3 exch def
  4128.          /x3 exch def
  4129.          /y2 exch def
  4130.          /x2 exch def
  4131.          /y1 exch def
  4132.          /x1 exch def
  4133.          curveto
  4134.          pop
  4135.          closepath
  4136.          
  4137.                  gsave
  4138.                  SetRandomRGB
  4139.                  fill
  4140.          grestore
  4141.  
  4142.          0 setgray stroke
  4143.          } for
  4144.       0 -4 translate
  4145.       } repeat
  4146.    } bind def
  4147.